lucasferreira / react-native-send-intent

React Native Android module to use Android's Intent actions for send text to shareable apps or make phone calls or opening third party apps
419 stars 159 forks source link

Fix: Calling startActivity() from outside of an Activity context #96

Closed usrbowe closed 5 years ago

usrbowe commented 5 years ago

After upgrading to latest React Native (0.60.4). App start crashing with: Calling startActivity() from outside of an Activity context, upon calling SendIntentAndroid.openEmailApp(); method.

I did follow fix from here: https://stackoverflow.com/questions/3918517/calling-startactivity-from-outside-of-an-activity-context

Maybe there might be better approaches?

OT: Also RN itself now supports Linking.sendIntent(), so would be nice to have this moved to RN repo, or community.

lucasferreira commented 5 years ago

Hi @usrbowe,

I don't move my self (and my projects) to RN 0.60.x yet, so your approach it's the only one we have right now.

Thanks for this ;)