Java Question {solved}java code for DisableStrictMode

Discussion in 'Libraries developers questions' started by DonManfred, Jan 22, 2015.

  1. DonManfred

    DonManfred Expert Licensed User

    Code:
    Sub DisableStrictMode
       
    Dim jo As JavaObject
       jo.InitializeStatic(
    "android.os.Build.VERSION")
       
    If jo.GetField("SDK_INT") > 9 Then
         
    Dim policy As JavaObject
         policy = policy.InitializeNewInstance(
    "android.os.StrictMode.ThreadPolicy.Builder"Null)
         policy = policy.RunMethodJO(
    "permitAll"Null).RunMethodJO("build"Null)
         
    Dim sm As JavaObject
         sm.InitializeStatic(
    "android.os.StrictMode").RunMethod("setThreadPolicy"Array(policy))
       
    End If
    End Sub
    What is the java-code for this? I want to integrate it in my library.
     
  2. thedesolatesoul

    thedesolatesoul Expert Licensed User

    Peter Simpson, NJDude and DonManfred like this.
  3. DonManfred

    DonManfred Expert Licensed User

  4. thedesolatesoul

    thedesolatesoul Expert Licensed User

    No probs man
     
Loading...
  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