1. *** New version of B4J is available ***
    B4J v7.8
    Dismiss Notice

Android Question Android 9 problem with android.os.SystemProperties

Discussion in 'Android Questions' started by menneaduplo, Apr 6, 2019.

  1. menneaduplo

    menneaduplo Member Licensed User

    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?

    Sub GetManufacturerSerialNumber As String
    Dim sn As String
    Dim r As Reflector
    Dim m As Object
    Dim Types(1As String

    0) = "java.lang.String"
        r.target = r.CreateObject(

        m = r.GetMethod(
    "get", Types)
        sn = r.InvokeMethod(r.Target,m,
    Return sn
    End Sub
    Thank you!
  2. Erel

    Erel Administrator Staff Member Licensed User

    lemonisdead likes this.
  3. menneaduplo

    menneaduplo Member Licensed User

    Thanks Erel,
    i used PhoneId.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice