Retrieving The Navigation History For The Current Running Application
I want a way to show the user where he is currently in the App. Example, if I have activity A,activity B, activity C and so on...If he navigates to activity E (for ex)..He should b
Solution 1:
You can use getStackTrace()
for getting navigates infromation:
StackTraceElementtraceElement= Thread.currentThread()
.getStackTrace()[3];
StringlogText= String.format(CLASS_METHOD_LINE_FORMAT,
traceElement.getClassName(), traceElement.getMethodName(),
traceElement.getLineNumber(), traceElement.getFileName());
Log.d("messg", logText);
or
cat /data/anr/traces.txt
but You need to have root access to modify the files in /data/
Post a Comment for "Retrieving The Navigation History For The Current Running Application"