File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -232,6 +232,13 @@ fn open_browser_internal(browser: Browser, url: &str) -> Result<ExitStatus> {
232232 }
233233}
234234
235+ /// Deal with opening of browsers on Android
236+ #[ cfg( target_os = "android" ) ]
237+ #[ inline]
238+ fn open_browser_internal ( browser : Browser , url : & str ) -> Result < ExitStatus > {
239+ Command :: new ( "am" ) . arg ( "start" ) . arg ( "--user" ) . arg ( "0" ) . arg ( "-a" ) . arg ( "android.intent.action.VIEW" ) . arg ( "-d" ) . arg ( url) . status ( )
240+ }
241+
235242/// Deal with opening of browsers on Mac OS X, using `open` command
236243#[ cfg( target_os = "macos" ) ]
237244#[ inline]
@@ -343,6 +350,7 @@ fn open_on_unix_using_browser_env(url: &str) -> Result<ExitStatus> {
343350}
344351
345352#[ cfg( not( any(
353+ target_os = "android" ,
346354 target_os = "windows" ,
347355 target_os = "macos" ,
348356 target_os = "linux" ,
You can’t perform that action at this time.
0 commit comments