i am using this code to get device id
it was working on targetsdk 26 but after setting the manifest to targetsdk 28 i got this error
B4X:
Sub GetDeviceId As String
Dim id As String
Dim r As Reflector
Dim Api As Int
Api = r.GetStaticField("android.os.Build$VERSION", "SDK_INT")
If Api < 9 Then
'Old device
id= GetDeviceId
Else
'New device
id= r.GetStaticField("android.os.Build", "SERIAL")
If id.ToLowerCase = "unknown" Then
id= GetDeviceId
End If
End If
Return id
End Sub
it was working on targetsdk 26 but after setting the manifest to targetsdk 28 i got this error
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
main_vvvvvv6 (java line: 707)
java.lang.StackOverflowError: stack size 8MB
at java.lang.reflect.Field.get(Native Method)
at anywheresoftware.b4a.agraham.reflection.Reflection.GetStaticField(Reflection.java:373)
at b4a.example.main._vvvvvv6(main.java:707)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.example.main._vvvvvv6(main.java:718)
at b4a.e
Message longer than Log limit (4000). Message was truncated.