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

cargo-apk: Export native activity by default on Android S and up #242

Merged
merged 2 commits into from
Mar 16, 2022

Conversation

MarijnS95
Copy link
Member

Depends on #241

Subsumes #204

Similar to how we help the user with a default MAIN intent filter to launch the sole NativeActivity in their application (and setting a few other sensible defaults), we should also set Android's new android:exported attribute to true if they're targeting Android S (SDK 31) or higher.

Without this set to true the Rust app is not allowed to be started externally (by ie. a launcher or adb) on Android S+, and with only a single Activity currently supported by ndk-build it is unlikely (but not impossible, see shared user IDs etc), that there are other means to start it internally.

https://developer.android.com/guide/topics/manifest/activity-element#exported

adrien-ben and others added 2 commits March 16, 2022 22:57
Similar to how we help the user with a default `MAIN` intent filter to
launch the sole `NativeActivity` in their application (and setting a few
other sensible defaults), we should also set Android's new
`android:exported` attribute to `true` if they're targeting Android S
(SDK 31) or higher.

Without this set to `true` the Rust app is not allowed to be started
externally (by ie. a launcher or `adb`) on Android S+, and with only a
single `Activity` currently supported by `ndk-build` it is unlikely (but
not impossible, see shared user IDs etc), that there are other means to
start it internally.

https://developer.android.com/guide/topics/manifest/activity-element#exported
@MarijnS95 MarijnS95 force-pushed the manifest-exported-attribute branch from 01c04db to ec8cd39 Compare March 16, 2022 21:57
@MarijnS95 MarijnS95 merged commit 78e9bef into master Mar 16, 2022
@MarijnS95 MarijnS95 deleted the manifest-exported-attribute branch March 16, 2022 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants