[android-developers] Re: Enable / Disable android widgets runtime.

2010-01-06 Thread Jurg
i am (also) having trouble enabling/disabling widgets at runtime.

as reported before you can enable/disable component with the
packagemanager. but for the widget the behaviour i see is not what i
expect.

the widget will be referenced in the widget menu on the home screen
when the widget is enabled by default. if you disable it by default
and enable it at runtime there is not change in the widget menu.

what do i have to do to 'force' this change to the widget menu?

groet,
jurg.
-- 
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

[android-developers] Re: Enable / Disable android widgets runtime.

2009-09-22 Thread Dianne Hackborn
Yep.  For the other part though you can use this to disable (make it as if
it doesn't exist) and re-enable any component of your application, such as
the receiver for the widget:
http://developer.android.com/reference/android/content/pm/PackageManager.html#setComponentEnabledSetting(android.content.ComponentName,
int, int)

On Tue, Sep 22, 2009 at 10:48 PM, nEx.Software  wrote:

>
> You cannot add or remove AppWidgets from your application. The user
> must explicitly do that from the home screen.
>
> On Sep 22, 10:40 pm, Manjunatha M  wrote:
> > Hi All,
> >
> > I am writing an widget  application for android.
> >
> > I have a requirement where i need to disable the widget on some intent,
> > i.e., I have the remove the widget from the android home screen and
> remove
> > from menu options so that the user cannot add the widget further.
> >
> > I have to enable the widget on some intent, so that, the framework
> > automatically adds the widget to the home screen, by calculating the
> empty
> > position available on the home screen, and the many option re-appears in
> > order to add the widget further.
> >
> > Please let me know if this can be possible..
> >
> > Regards,
> > Manjunatha
> >
>


-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

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



[android-developers] Re: Enable / Disable android widgets runtime.

2009-09-22 Thread nEx.Software

You cannot add or remove AppWidgets from your application. The user
must explicitly do that from the home screen.

On Sep 22, 10:40 pm, Manjunatha M  wrote:
> Hi All,
>
> I am writing an widget  application for android.
>
> I have a requirement where i need to disable the widget on some intent,
> i.e., I have the remove the widget from the android home screen and remove
> from menu options so that the user cannot add the widget further.
>
> I have to enable the widget on some intent, so that, the framework
> automatically adds the widget to the home screen, by calculating the empty
> position available on the home screen, and the many option re-appears in
> order to add the widget further.
>
> Please let me know if this can be possible..
>
> Regards,
> Manjunatha
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---