Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React native app to receive share links from apps like youtube

I am new to React native. I am developing an app to receive shared url like in youtube share which shares the url.like this I have added the code to register receive activity in xml like this

 <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
          <action android:name="android.intent.action.SEND" />
          <category android:name="android.intent.category.DEFAULT" />
          <data android:mimeType="text/plain" />
 </intent-filter>

But in my App.js code how could i receive the data and do further processing.

like image 204
Ashokkumar Avatar asked Dec 08 '22 12:12

Ashokkumar


2 Answers

You can use Deep Linking from react-navigation. Check this Article for example.

like image 130
Maneesh Avatar answered Dec 10 '22 01:12

Maneesh


You can do this with react-native-share-extension

like image 45
Vinil Prabhu Avatar answered Dec 10 '22 00:12

Vinil Prabhu