-
-
Notifications
You must be signed in to change notification settings - Fork 360
Description
Currently tauri and frameworks that rely on wry/tao such as dioxus don't seem to support passing data to an android application through e.g. the SEND intent on android. For example I would like to share an URL from my browser with my app, but there's no way to receive the Intent from the native Rust code.
Proposed solution
Receive intents in the WryActivity and call a function in the ndk_glue (in tao). A separate crate, that client code can depend on, should expose an API that allows receiving the intents from Rust.
Alternatives
The obvious drawback of implementing this in wry/tao is feature bloat: receiving intents should maybe not really be a concern of wry.
class extension
This feature possibly could e.g. also be implemented as part of the WRY_WRYACTIVITY_CLASS_EXTENSION
envvar; however, since there's also a native component to this, the user would have to setup the build environment for another native library to compile for the target, so that the native code can be notified of intents.
In general it would be nice if there was an easy way to setup your app for receiving intents.
separate activity
the user could create a separate activity altogether, that stores the intent data somewhere, then launches the main activity, which then retrieves the intent data from the storage location.
this would be possibly less flexible, since the original intent jobject would likely be lost.