Android Question Open settings

hookshy

Well-Known Member
Licensed User
Longtime User
How can I open default settings page by intent ?

Since I found no post on forum i tried to open by pakage name but i I think i have no permision to lauch such package ! What permision should I add to manifest editor?
Does all phone have same package name for default settings?

B4X:
        Dim Intent1 As Intent
    Intent1.Initialize("","")
    Intent1=pma.GetApplicationIntent("settings package name ")
    If Intent1.IsInitialized Then
    StartActivity(Intent1)
end if
 

PierPaduan

Active Member
Licensed User
Longtime User
Hi,
I use the above code of NJDude (thanks a lot to him) to open Settings page, and this works perfect on many devices ( android 2.2, 4.1.2, 4.2.1 ), but on one device (android 4.2.2 ), when I try to run that part of code, I obtain this error:
Error opening Settings.JPG
What can I do to fix this problem?
Might be that the "component" name is changed on more recent android OS ???
Thanks a Lot to everyone can help me.
Best Regards.
 
Upvote 0

PierPaduan

Active Member
Licensed User
Longtime User
The device is a SAMSUNG GT-I9105P.

Do you mean to use "Try... Catch"?

But if I capture the error, how can I set the correct name of the component?

Thanks.
 
Upvote 0

hookshy

Well-Known Member
Licensed User
Longtime User
I am not able to open settings on Jelly Bean with the code above ...due to Permission DEnial....
unfortunately there are no much setttings in security as in kitkat to manage permissions ..maybe code is to strong for android device
if you could advise it will be great
 
Upvote 0

Croïd

Active Member
Licensed User
Longtime User
It can Help ( list Application Identifier Application & Screen)
 

Attachments

  • Application Identifier.txt
    976 bytes · Views: 308
Upvote 0

Arf

Well-Known Member
Licensed User
Longtime User
Hi,
NJDude's method worked for me:
B4X:
i.SetComponent("com.android.settings/.Settings")

But I need to open the STATUS page, and can't seem to get the right text. Last tried:
B4X:
i.SetComponent("com.android.settings/.Settings.deviceinfo.status")

anyone know?
 
Upvote 0

Arf

Well-Known Member
Licensed User
Longtime User
Got it..
B4X:
i.SetComponent("com.android.settings/.deviceinfo.Status")
 
Upvote 0
Top