react-native-send-intent icon indicating copy to clipboard operation
react-native-send-intent copied to clipboard

Question - what is the right way to open the web browser?

Open GYberkeley opened this issue 6 years ago • 4 comments
trafficstars

Is there a web browser intent that can be sent through this library?

EDIT: Also is there a way to fire custom intents? Like I want to open my launcher. Is there a way to fire that from this library?

GYberkeley avatar Mar 27 '19 14:03 GYberkeley

To open browser you could use the native way:

https://facebook.github.io/react-native/docs/linking#opening-external-links

lucasferreira avatar Mar 27 '19 16:03 lucasferreira

Got it. Thank you! What about launching the launcher intent: 'android.intent.action.launcher'

Is there a way to do that?

GYberkeley avatar Mar 27 '19 17:03 GYberkeley

I don't know if you need it's really a "custom intent", you could try openApp method:

https://github.com/lucasferreira/react-native-send-intent#example--open-app

lucasferreira avatar Mar 27 '19 18:03 lucasferreira

Hmm.. So you're saying I could try SendIntentAndroid.openApp('android.intent.action.launcher'); and it might work?

GYberkeley avatar Mar 27 '19 18:03 GYberkeley