cargo-apk: Export native activity by default on Android S and up #242
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Depends on #241
Subsumes #204
Similar to how we help the user with a default
MAIN
intent filter to launch the soleNativeActivity
in their application (and setting a few other sensible defaults), we should also set Android's newandroid:exported
attribute totrue
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 oradb
) on Android S+, and with only a singleActivity
currently supported byndk-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