Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default workspace widgets not being inflated #17

Open
Roboe opened this issue May 20, 2018 · 1 comment
Open

Default workspace widgets not being inflated #17

Roboe opened this issue May 20, 2018 · 1 comment

Comments

@Roboe
Copy link
Member

Roboe commented May 20, 2018

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.

@Roboe
Copy link
Member Author

Roboe commented May 28, 2018

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant