Android Code Snippet SETTING

Hi all.
I tried it with Android > 6 to set to automatically open the settings window with the following code:

B4X:
    Dim i As Intent
    i.Initialize("", "")
    i.SetComponent("com.android.settings/.SecuritySettings")
    StartActivity(i)

as suggestion in a thread by NJDUDE ( LINK )

but this give me error:

Anyway i found solution with this code:

B4X:
Dim StartIntent As Intent
StartIntent.Initialize("android.settings.USAGE_ACCESS_SETTINGS", "")
StartActivity(StartIntent)

if you read this documentation ( LINK )
you can add Setting as you want:


Bye
Marco
 

MarcoRome

Expert
Licensed User
Longtime User
Without ACTION_ look my example in post #1
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…