iOS Question how to open settings

f0raster0

Well-Known Member
Licensed User
Longtime User
Guys,

Does anyone know how to open setting?
I try the code below but the App is closed immediately
B4X:
'try 2
    If App.OSVersion >= 8 Then
        App.OpenURL("app-settings:")
    End If
'try 1
'   App.OpenURL("app-settings:")

I want to send the user to setting when Bluetooth is off.
Testing using iPhone 5C, iOS 10.3.3

Thanks
 
Last edited:

JordiCP

Expert
Licensed User
Longtime User
I can use it normally (iPhone 5S, iOS 12.4.4), and brings me to my app settings if it uses permissions, or to General Settings if the app doesn't need any.

What's the result of App.CanOpenURL("app-settings:") ?
 
Upvote 0

f0raster0

Well-Known Member
Licensed User
Longtime User
I can use it normally (iPhone 5S, iOS 12.4.4), and brings me to my app settings if it uses permissions, or to General Settings if the app doesn't need any.

What's the result of App.CanOpenURL("app-settings:") ?
just the App is closed immediately, I can't debug.. trying to solve the debug option now.
 
Upvote 0

f0raster0

Well-Known Member
Licensed User
Longtime User
ok, if I try this:
B4X:
Sub LabeliconBLEoff_Click
'    If App.OSVersion >= 9 Then
'        App.OpenURL("app-settings:")
'       
'    End If
    App.OpenURL("app-settings:")
    Log("here log")

End Sub
I see this:
B4X:
Application_Start
Application_Active
Bluetooth StatusOFF
here log
 
Upvote 0

Semen Matusovskiy

Well-Known Member
Licensed User
App.OpenURL("app-settings:") works fine on my iPhone 6s, IOS 13.3)
Guess, a problem not in App.OpenUrl as it is. Try to add Return after App.OpenURL and exit from subroutine.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…