Skip to content
Discussion options

You must be logged in to vote

Ok so the open crate doesn't really have dedicated android code, which mean they basically attempt to run terminal commands like on linux but you need high permissions to do that from an app.

The proper way to do it on Android is to use what's called ACTION_VIEW intents that can trigger opening of other apps. The crate webbrowser uses those and thus manages to open links even in apps without any permissions. It is fully crossplatform and super useful!

On android and IOS it is restricted to http though (for safety and error handeling I guess) but using their code without the http validation allowed me to open mailto links as well.

// In Cargo.toml
// [target.'cfg(target_os = "android")'.de…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@guimath
Comment options

@guimath
Comment options

Answer selected by guimath
@Vadoola
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants