I would also like to know, how to add a widget to the home screen
programmatically.The idea is, that the app would ask the user, if he
would also like a widget.

On 8 mar., 21:29, shaun <[email protected]> wrote:
> Not sure if this is what you are going for....
>
> It is possible to have a single APK install that has a main Activity
> component as well as a Widget.  I saw a demo where the .apk file is
> installed, you can open the Activity as a normal application and on
> the home screen(s) add a Widget from that application.  The Widget in
> this case was just a shortcut to open the application in a certain
> spot for convenience (i.e. bookmark).
>
> I guess this was accomplised through the contents of
> AndroidManifest.xml where the main Activity was defined along with a
> Widget.  Not too familiar with Widgets yet, so maybe this is common
> knowledge.
>
> I wish I could track down the guy who showed me that as I would like
> to do the same thing.  Although, all the information on how to do this
> might be easily located in the documentation.  I have not looked much,
> but will start to soon.
>
> On Mar 7, 3:46 pm, Mark Murphy <[email protected]> wrote:
>
>
>
> > ik wrote:
> > > Here is an example to create a button :
>
> > The OP asked about app widgets (a.k.a., home screen widgets), not
> > widgets for use in activities.
>
> > >> Is it possible to programmatically create and/or destroy AppWidgets?
>
> > No. Users have to add and remove app widgets.
>
> > --
> > Mark Murphy (a Commons 
> > Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> > Android Training...At Your Office:http://commonsware.com/training

-- 
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