It is possible to access your apps logs with LogCat from the Phone library. Note that it doesn't require any permission however you cannot use it to read the logs of other apps. The LogCatData event is raised on a different thread. This makes it a bit more difficult to work with this event if...
This will work in B4A and B4J, it will log the underlying Java stack:
B4X:
Sub LogStackTrace
Dim jo As JavaObject
Dim stack() As Object = jo.InitializeStatic("java.lang.Thread").RunMethodJO("currentThread", Null).RunMethod("getStackTrace", Null)
For Each st As JavaObject In stack
Log(st.RunMethod("getClassName", Null) & ": " & st.RunMethod("getMethodName", Null))
Next
End Sub
It is possible to access your apps logs with LogCat from the Phone library. Note that it doesn't require any permission however you cannot use it to read the logs of other apps. The LogCatData event is raised on a different thread. This makes it a bit more difficult to work with this event if...
thanks Manfred
i don't access to log but simply i need to know what is sub tha have called a second sub from second sub
for example
i have a pubblic sub named Log_generic that is called some times.
From this sub i need to know who have calledit without pass subFrom parameter if possible.
B4X:
sub s1
msgbox("first sub","")
log_Generic("s1","detail of log..")
end sub
sub log_Generic(subFrom as String, LogData as String)
'i need here to know subFrom without pass the parameter if possible
LOG($"
Procedure: ${subFrom}
Detail: ${logData}
"$)
end sub