Open Roboe opened 6 years ago
I'm starting to think this is impossible for third-party launchers...
Not for use by third-party applications.
https://developer.android.com/reference/android/Manifest.permission#BIND_APPWIDGET
The only way around this is for system apps to request
android.permission.BIND_APPWIDGET
in their manifest, so this method is only available on rooted devices where the app is installed at the system level (in/system/app
or/system/priv-app
).
https://www.jacobmansfield.co.uk/p/2017/04/25/adding-android-widgets-without-user-interaction/
Inherited from #16.
Since Android 4.1, the
BIND_APPWIDGET
needs explicit permission to load a widget, as stated in the Android docs: https://developer.android.com/guide/topics/appwidgets/host#binding-41 (which IMHO is a little inconsistent with how permissions are asked from Android 6 onwards, but whatever)The default workspace configuration includes widgets from our package (
community.fairphone.fplauncher3
) and from external packages (community.fairphone.mycontacts
). Neither of them is added by default.Seems like Workspace.java handles inflating shortcuts and widgets from XML files.