Hi guys
the code below does not work on Android 9.
The error appears:
java.lang.RuntimeException: java.lang.IllegalAccessException: void android.os.SystemProperties.<init>() is not accessible from java.lang.Class<anywheresoftware.b4a.agraham.reflection.Reflection>
Can anyone help me?
Thank you!
Mennea
the code below does not work on Android 9.
The error appears:
java.lang.RuntimeException: java.lang.IllegalAccessException: void android.os.SystemProperties.<init>() is not accessible from java.lang.Class<anywheresoftware.b4a.agraham.reflection.Reflection>
Can anyone help me?
B4X:
Sub GetManufacturerSerialNumber As String
Dim sn As String
Dim r As Reflector
Dim m As Object
Dim Types(1) As String
Types(0) = "java.lang.String"
r.target = r.CreateObject("android.os.SystemProperties")
m = r.GetMethod("get", Types)
sn = r.InvokeMethod(r.Target,m,Array("ril.serialnumber"))
Return sn
End Sub
Thank you!
Mennea