0

Is there any way to know from where a function is called in Android ??

In my application (Its a huge one, that's source code is downloaded from the internet.) a set of functions executing. I cant figure out from where they are called !

Is there any ways ??

AKA
  • 5,479
  • 4
  • 22
  • 36
  • You can use Logcat to track your codes....like Log.e("running block =","main method or something else you can write here !"); – Rohit Goswami Jun 23 '14 at 11:04
  • Print the stack trace. – nhaarman Jun 23 '14 at 11:04
  • @RohitGoswami I didn't get you ! :( Please explain..! – AKA Jun 23 '14 at 11:41
  • I tried the answer suggested by Pankaj Kumar, I tried the following code: `StackTraceElement[] stackTraceElements = Thread.currentThread().getStackTrace(); Log.d("Stack trace",String.valueOf(stackTraceElements[1]));` and the result on the **log** is : `java.lang.Thread.getStackTrace(Thread.java:591)` What does it mean ?? – AKA Jun 23 '14 at 11:44

0 Answers0