> @Dianne: If you define some standard intent for the calculator, please
> make it accept some number extra that appears in the display :-)

and return the final result in onActivityResult() :-)

Peli

>
> Peli
>
> On 2 Jul., 20:01, schwiz <[email protected]> wrote:
>
>
>
> > well the widget I am making most likely wont be released on the market
> > but I had intended to just do a try catch, and if it doesn't find the
> > app it would just throw up a little message saying that toggle
> > settings wasn't found on the system.. Will the logcat catch the name I
> > need to launch the application if I launch it with my device, or do I
> > need to somehow install the app on the emulator?  Sorry Im at work
> > right now so I can't actually test to see myself.
>
> > On Jul 2, 12:37 pm, Dianne Hackborn <[email protected]> wrote:
>
> > > I believe the calculator has an action defined for launching with a value.
> > > But still...  it is not a part of the standard platform, so you would be 
> > > in
> > > trouble if you were relying on it being there -- I wouldn't count on it
> > > being on every device, and certainly if we do define some intent action 
> > > for
> > > the calculator, it is absolutely positively not going to be the same
> > > component name (let alone just package name) that is implementing the
> > > calculator on every device.  This is the kind of thing that manufacturers
> > > will customize a lot.
>
> > > On Thu, Jul 2, 2009 at 9:59 AM, Peli <[email protected]> wrote:
>
> > > > So what would be the best way to write, e.g., a restaurant bill widget
> > > > that launches the built-in calculator?
>
> > > > It does not have any other intent filters except MAIN LAUNCHER:
>
> > > >http://android.git.kernel.org/?p=platform/packages/apps/Calculator.gi...
>
> > > > Peli
>
> > > > On Jul 2, 6:54 pm, Dianne Hackborn <[email protected]> wrote:
> > > > > The launcher doesn't have any hard-coded component names; it does a 
> > > > > query
> > > > of
> > > > > the system for all activities implementing MAIN LAUNCHER.
>
> > > > > On Thu, Jul 2, 2009 at 9:52 AM, Peli <[email protected]> wrote:
>
> > > > > > Sorry, my mistake. Of course for settings it is better to use the
> > > > > > appropriate intent action.
>
> > > > > > But for many applications, the launcher intent is simply MAIN (in
> > > > > > category LAUNCHER), so there is no way to differentiate between
> > > > > > different applications, except by their component - right? (or is it
> > > > > > easily possible to specify the intent MAIN restricted to a specific
> > > > > > package? rather than specifying the full component?)
>
> > > > > > Peli
> > > > > >www.openintents.org
>
> > > > > > On Jul 2, 6:46 pm, Dianne Hackborn <[email protected]> wrote:
> > > > > > > Please don't hard-code component names of other packages.  Those 
> > > > > > > are
> > > > > > > implementation details, and you can very well break at some point 
> > > > > > > in
> > > > the
> > > > > > > future.  The Settings class has a number of intent actions to 
> > > > > > > launch
> > > > > > > standard settings panels; for other things, you should figure out 
> > > > > > > the
> > > > > > right
> > > > > > > intent protocol do you what you want.
>
> > > > > > > On Thu, Jul 2, 2009 at 9:32 AM, Peli <[email protected]>
> > > > wrote:
>
> > > > > > > > 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;.
> > > > > > ..
>
> > > > > > > > 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?
>
> > > > > > > --
> > > > > > > Dianne Hackborn
> > > > > > > Android framework engineer
> > > > > > > [email protected]
>
> > > > > > > Note: please don't send private questions to me, as I don't have 
> > > > > > > time
> > > > to
> > > > > > > provide private support, and so won't reply to such e-mails.  All
> > > > such
> > > > > > > questions should be posted on public forums, where I and others 
> > > > > > > can
> > > > see
> > > > > > and
> > > > > > > answer them.
>
> > > > > --
> > > > > Dianne Hackborn
> > > > > Android framework engineer
> > > > > [email protected]
>
> > > > > Note: please don't send private questions to me, as I don't have time 
> > > > > to
> > > > > provide private support, and so won't reply to such e-mails.  All such
> > > > > questions should be posted on public forums, where I and others can 
> > > > > see
> > > > and
> > > > > answer them.
>
> > > --
> > > Dianne Hackborn
> > > Android framework engineer
> > > [email protected]
>
> > > Note: please don't send private questions to me, as I don't have time to
> > > provide private support, and so won't reply to such e-mails.  All such
> > > questions should be posted on public forums, where I and others can see 
> > > and
> > > answer them.
--~--~---------~--~----~------------~-------~--~----~
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