Android Question Get a List of Settings

Bucky108

Member
Licensed User
Longtime User
Is it possible to get a list of available settings on a device? I want to select different settings and then start the selected setting activity as in this example from the forum:

B4X:
Dim i As Intent
i.Initialize"android.settings.SECURITY_SETTINGS", "")
StartActivity(i)
 

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

Bucky108

Member
Licensed User
Longtime User
Well what I had in mind is to get the available settings from the system, perhaps using Reflection or JavaObject libraries?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
B4J code:
B4X:
Sub AppStart (Args() As String)
   Dim j As HttpJob
   j.Initialize("j", Me)
   j.Download("https://developer.android.com/reference/android/provider/Settings.html")
   StartMessageLoop
End Sub

Sub JobDone(j As HttpJob)
   Dim s As String = j.GetString
   Dim strings As List
   strings.Initialize
   Dim m As Matcher = Regex.Matcher($"Constant Value:\s*\"([^\"]+)\""$, s)
   Do While m.Find
     strings.Add(m.Group(1))
   Loop
   File.WriteList(File.DirApp, "strings.txt", strings)
   ExitApplication
End Sub
 

Attachments

  • strings.txt
    2.6 KB · Views: 251
Upvote 0
Top