toby Well-Known Member Licensed User Longtime User Jan 22, 2022 #1 I want to open up my app's setting page via intent and the following code block is supposed to do just that. stackoverflow source Could someone kindly translate it to B4A code, please? [CODE lang="java" title="to be translated to B4A"] Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS); Uri uri = Uri.fromParts("package", getPackageName(), null); intent.setData(uri); startActivity(intent); [/CODE] TIA
I want to open up my app's setting page via intent and the following code block is supposed to do just that. stackoverflow source Could someone kindly translate it to B4A code, please? [CODE lang="java" title="to be translated to B4A"] Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS); Uri uri = Uri.fromParts("package", getPackageName(), null); intent.setData(uri); startActivity(intent); [/CODE] TIA
Solution agraham Jan 23, 2022 This works for me - note the different URI. B4X: Dim in As Intent in.Initialize("android.settings.APPLICATION_DETAILS_SETTINGS", "package:" & Application.PackageName) ' see the difference StartActivity(in)
This works for me - note the different URI. B4X: Dim in As Intent in.Initialize("android.settings.APPLICATION_DETAILS_SETTINGS", "package:" & Application.PackageName) ' see the difference StartActivity(in)
Erel B4X founder Staff member Licensed User Longtime User Jan 23, 2022 #2 This is the equivalent code but it doesn't seem to work: Code: Dim in As Intent in.Initialize("android.settings.APPLICATION_DETAILS_SETTINGS", "package://" & Application.PackageName) StartActivity(in) Upvote 0
This is the equivalent code but it doesn't seem to work: Code: Dim in As Intent in.Initialize("android.settings.APPLICATION_DETAILS_SETTINGS", "package://" & Application.PackageName) StartActivity(in)
toby Well-Known Member Licensed User Longtime User Jan 23, 2022 #3 It doesn't work for me either. Thanks anyway? Upvote 0
agraham Expert Licensed User Longtime User Jan 23, 2022 #4 This works for me - note the different URI. B4X: Dim in As Intent in.Initialize("android.settings.APPLICATION_DETAILS_SETTINGS", "package:" & Application.PackageName) ' see the difference StartActivity(in) Upvote 2 Solution
This works for me - note the different URI. B4X: Dim in As Intent in.Initialize("android.settings.APPLICATION_DETAILS_SETTINGS", "package:" & Application.PackageName) ' see the difference StartActivity(in)
toby Well-Known Member Licensed User Longtime User Jan 23, 2022 #5 agraham said: This works for me - note the different URI. B4X: Dim in As Intent in.Initialize("android.settings.APPLICATION_DETAILS_SETTINGS", "package:" & Application.PackageName) ' see the difference StartActivity(in) Click to expand... I tried it and it works indeed! Thank you so much and to keep you awake, I just sent you some coffee money. Upvote 0
agraham said: This works for me - note the different URI. B4X: Dim in As Intent in.Initialize("android.settings.APPLICATION_DETAILS_SETTINGS", "package:" & Application.PackageName) ' see the difference StartActivity(in) Click to expand... I tried it and it works indeed! Thank you so much and to keep you awake, I just sent you some coffee money.
agraham Expert Licensed User Longtime User Jan 23, 2022 #6 toby said: I just sent you some coffee money. Click to expand... Many thanks - appreciate it. Upvote 0