Security exception while calling bindAppWidgetId

前端 未结 2 996
再見小時候
再見小時候 2021-01-19 05:55

While developing a Launcher (Homescreen) application for Android, I\'ve come into a security exception I don\'t understand.

  • When calling the [bindAppWidgetId()
2条回答
  •  日久生厌
    2021-01-19 06:33

    I've found an answer!

    BindAppWidgetId() is deliberately not available to applications! (security problems).

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

    Here are the links to this information :

    http://groups.google.com/group/android-developers/browse_thread/thread/231245ba6d1e690f/047b9d3f776d7e54?lnk=gst&q=bindAppWidgetId#047b9d3f776d7e54

    http://groups.google.com/group/android-developers/browse_thread/thread/f24e0f484a79d529/ef84188e8533a125?lnk=gst&q=bindAppWidgetId#ef84188e8533a125

提交回复
热议问题