Sorry there was a mistake in my last post.

The error is
04-15 09:42:19.799: WARN/System.err(1358):
android.content.ActivityNotFoundException: Unable to find explicit
activity class {com.android.settings/
com.android.settings.SecuritySettings}; have you declared this
activity in your AndroidManifest.xml?



On Apr 15, 9:49 am, San <sanees...@gmail.com> wrote:
> Hi Mark/GodsMoon,
>
> I am also facing similar issue.
> I have to enable GPS programatically when the app starts.
> I am getting an error
> 04-15 09:36:42.579: WARN/System.err(1299):
> android.content.ActivityNotFoundException: No Activity found to handle
> Intent { action=android.settings.LOCATION_SOURCE_SETTINGS
> categories={android.intent.category.LAUNCHER} flags=0x10000000 }
>
> Here is my code.
>         final ComponentName toLaunch = new
> ComponentName("com.android.settings","com.android.settings.SecuritySettings­");
>         final Intent intent = new
> Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
>         intent.addCategory(Intent.CATEGORY_LAUNCHER);
>         intent.setComponent(toLaunch);
>         intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
>         startActivityForResult(intent, 0);
>
> I tried without setting the component.
> Can any of you help me?
>
> One more Info, this code works fine in Mototrola Droid. The error
> occures in HTC Desire.
>
> Regards,
> Saneesh
>
> On Apr 10, 3:00 pm, GodsMoon <godsm...@gmail.com> wrote:
>
>
>
> > I was actually looking for Settings.ACTION_SECURITY_SETTINGS
> > but your comment lead me right to it. Thanks.
>
> > On Apr 10, 5:36 pm, Mark Murphy <mmur...@commonsware.com> wrote:
>
> > > GodsMoon wrote:
> > > > I'm trying to link to the settings menu.
> > > > The following code works great for stock Android but doesn't work in
> > > > the 2.1 HTC Sense UI.
>
> > > > Intent goToSettings = new Intent(Settings.ACTION_LOCALE_SETTINGS);
> > > > goToSettings.setComponent(new
> > > > ComponentName("com.android.settings","com.android.settings.SecuritySettings­"));
> > > > startActivity(goToSettings);
>
> > > > On the HTC Legend that code gives the following Error in the LogCat
> > > > E/AndroidRuntime(  626): android.content.ActivityNotFoundException:
> > > > Unable to find explicit activity class {com.android.settings/
> > > >com.android.settings.SecuritySettings}; have you declared this
> > > > activity in your AndroidManifest.xml?
>
> > > > I don't have a phone with the HTC Senese UI. How do I link to settings
> > > > menu on the HTC Legend?
>
> > > Try getting rid of the setComponent() call. The ACTION_LOCALE_SETTINGS
> > > should be sufficient, and will cover you in case they renamed the class.
>
> > > --
> > > Mark Murphy (a Commons 
> > > Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> > > Android Development Wiki:http://wiki.andmob.org-Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe, reply using "remove me" as the subject.

Reply via email to