If you are only interested in a specific application, you can study
the logcat output while launching that application. It will tell you
the component that is necessary to launch it.

Looking at the Settings manifest:
http://android.git.kernel.org/?p=platform/packages/apps/Settings.git;a=blob;f=AndroidManifest.xml;h=7b3e689a6eb3d9fdbede1f016215aeba95c12338;hb=HEAD

I presume that the activity you want to launch is started by:
Intent i = new Intent();
i.setClassName("com.android.settings",
"com.android.settings.BatteryInfo");
startActivity(i);

or which settings did you want to launch?

Peli
www.openintents.org

On Jul 2, 5:48 pm, schwiz <[email protected]> wrote:
> well there a ton of battery life widgets out there but I just want a
> battery % widget that launches toggle settings for my convenience.  I
> just want to basically save a slot on my home screen. thanks for the
> link I'll take a look into it hopefully it will get me where I need to
> be.
>
> On Jul 2, 10:42 am, Peli <[email protected]> wrote:
>
> > First of all - what is the point of that widget? A user could simply
> > drag and drop the icon of the application they want to launch to the
> > home screen.
>
> > If you are still convinced you need it, you probably also want to
> > include an activity picker:http://www.openintents.org/en/node/263
>
> > On that page you find a small sample code how to start a
> > PICK_ACTIVITY.
>
> > The result is obtained in onActivityResult(). Using getComponentName()
> > you can retrieve the components that are required to launch the
> > desired application.
>
> > I hope this help.
>
> > Peliwww.openintents.org
>
> > On Jul 2, 4:32 pm, schwiz <[email protected]> wrote:
>
> > > Actually I can't even seem to find out how to do this with one of my
> > > own apps can anyone give me a code sample or point to some good
> > > documentation.  Ive read the actual android reference on intents and
> > > startActivity but I still can't figure it out.
>
> > > On Jul 1, 11:08 pm, schwiz <[email protected]> wrote:
>
> > > > I'm wanting to make a widget that launches an app another developer
> > > > made when you touch it.  I know you use the startActivity(intent)
> > > > meathod.  But I am wondering how I know what the intent is short of
> > > > emailing the developer and asking?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to