Hey,

Deren, you did it correctly. But there is something missing. The
android.permission.BIND_APPWIDGET permission is a system permission.
You can only get that permission if your package is installed as a
system package (installed in /system/app in stead of /data/app) or
sign you app with a certificate that's the same as your android image.
So basicly this means you can only use this permission if you are also
the creator of the android image on your platform/phone.

Regards,

Peter


On Apr 20, 12:25 pm, AndroidNewbie <[email protected]> wrote:
> I am facing the exact same issue . Can someone help please ? Deren ,
> were you able to get the help from someone ?
>
> On Feb 20, 5:15 pm, Deren <[email protected]> wrote:
>
>
>
> > I've successfully built a small sample app where the user can add a
> > appwidget, using the AppWidgetPicker, using the action
> > AppWidgetManager.ACTION_APPWIDGET_PICK. When I do this, the
> > AppWidgetPicker takes care of binding my appwidget-id to a provider.
> > However, now I'd like to load some widgets without using the
> > AppWidgetPicker (for instance, maybe I want to restore the added
> > appwidgets when I restart the application or something). I've tried
> > the following code
>
> > ComponentName widget = new ComponentName("com.android.alarmclock",
> > "com.android.alarmclock.AnalogAppWidgetProvider");
>
> > int appWidgetId = mAppWidgetHost.allocateAppWidgetId();
> > mAppWidgetManager.bindAppWidgetId(appWidgetId, widget);
>
> > but it fails with a SecurityException, even though I've added
>
> > <uses-permission android:name="android.permission.BIND_APPWIDGET"/>
>
> > to my manifest file. Is this the way to do it? (using
> > AppWidgetManager.bindAppWidgetId). Im using the emulator, and android
> > 2.1.
>
> --
> 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 
> athttp://groups.google.com/group/android-developers?hl=en

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