Reputation: 45
Any solution or Hint for finding activity name in which error or exception occurred from LogCat.
your answer would be appreciated.
Upvotes: 1
Views: 331
Reputation: 353
Create a variable:
private static final String TAG = YourActivity.class.getSimpleName();
and then use this code to get LogCat message:
Log.d(TAG, "Message " + ex.toString());
Upvotes: 1
Reputation: 3158
Log.d(TAG, "...Any Thing... ");
put TAG as public static String TAG = "Your Activity name";
on your activity
Upvotes: 0