trepdas Active Member Licensed User Longtime User Mar 8, 2018 #1 Hi everybody. I am trying to open the phone's settings with this code : Code: Dim i2 As Intent i2.Initialize("", "") i2.SetComponent("com.android.settings/.Settings") StartActivity(i2) but I get this in log : android.content.ActivityNotFoundException: Unable to find explicit activity class {com.android.settings/com.android.settings.Settings}; have you declared this activity in your AndroidManifest.xml? Click to expand... when I try to open the status page Code: Dim i2 As Intent i2.Initialize("", "") 'i2.SetComponent("com.android.settings/.Settings") i2.SetComponent("com.android.settings/.deviceinfo.Status") StartActivity(i2) it works fine. is there anything I missed in the manifest?
Hi everybody. I am trying to open the phone's settings with this code : Code: Dim i2 As Intent i2.Initialize("", "") i2.SetComponent("com.android.settings/.Settings") StartActivity(i2) but I get this in log : android.content.ActivityNotFoundException: Unable to find explicit activity class {com.android.settings/com.android.settings.Settings}; have you declared this activity in your AndroidManifest.xml? Click to expand... when I try to open the status page Code: Dim i2 As Intent i2.Initialize("", "") 'i2.SetComponent("com.android.settings/.Settings") i2.SetComponent("com.android.settings/.deviceinfo.Status") StartActivity(i2) it works fine. is there anything I missed in the manifest?
DonManfred Expert Licensed User Longtime User Mar 8, 2018 #2 https://stackoverflow.com/questions/19517417/opening-android-settings-programmatically Upvote 0
trepdas Active Member Licensed User Longtime User Mar 8, 2018 #3 ok. changed to Code: i2.SetComponent("com.android.settings/.Settings") it works only with the android emulator. when I try galaxy s4 - still doesn't work. same error looks like it prints twice the "com.android.settings" in the log... android.content.ActivityNotFoundException: Unable to find explicit activity class {com.android.settings/com.android.settings.ACTION_SETTINGS}; have you declared this activity in your AndroidManifest.xml? Click to expand... Last edited: Mar 8, 2018 Upvote 0
ok. changed to Code: i2.SetComponent("com.android.settings/.Settings") it works only with the android emulator. when I try galaxy s4 - still doesn't work. same error looks like it prints twice the "com.android.settings" in the log... android.content.ActivityNotFoundException: Unable to find explicit activity class {com.android.settings/com.android.settings.ACTION_SETTINGS}; have you declared this activity in your AndroidManifest.xml? Click to expand...
Erel B4X founder Staff member Licensed User Longtime User Mar 8, 2018 #4 It should be: Code: Dim i2 As Intent i2.Initialize("com.android.Settings.ACTION_SETTINGS", "") StartActivity(i2) Upvote 0
It should be: Code: Dim i2 As Intent i2.Initialize("com.android.Settings.ACTION_SETTINGS", "") StartActivity(i2)
trepdas Active Member Licensed User Longtime User Mar 8, 2018 #5 Ok. Tried it. didn't work. the only working code was through the emulator only and with Code: i2.SetComponent("com.android.settings/.Settings") when i TRY THIS : Code: Dim i3 As Intent i3.Initialize("com.android.Settings.ACTION_SETTINGS", "") StartActivity(i3) doesn't work both in the emulator and in the galaxy s4. log : android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.android.Settings.ACTION_SETTINGS flg=0x20000 } Click to expand... Last edited: Mar 8, 2018 Upvote 0
Ok. Tried it. didn't work. the only working code was through the emulator only and with Code: i2.SetComponent("com.android.settings/.Settings") when i TRY THIS : Code: Dim i3 As Intent i3.Initialize("com.android.Settings.ACTION_SETTINGS", "") StartActivity(i3) doesn't work both in the emulator and in the galaxy s4. log : android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.android.Settings.ACTION_SETTINGS flg=0x20000 } Click to expand...
Erel B4X founder Staff member Licensed User Longtime User Mar 8, 2018 #6 The action parameter should be: android.settings.SETTINGS com.android.Settings.ACTION_SETTINGS is the field name. Code: Dim i2 As Intent i2.Initialize("android.settings.SETTINGS", "") StartActivity(i2) Upvote 0
The action parameter should be: android.settings.SETTINGS com.android.Settings.ACTION_SETTINGS is the field name. Code: Dim i2 As Intent i2.Initialize("android.settings.SETTINGS", "") StartActivity(i2)