Integrates Google App Indexing with React Native.
$ npm install --save react-native-app-indexing
After installing the npm package you need to link the native modules. You can do so using rnpm.
$ rnpm link react-native-app-indexing
Then you will need to follow some extra steps.
Add in the main activity of your manifest (android/app/src/mainAndroidManifest.xml
) the following intent-filter
.
<activity
...>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" />
<data android:scheme="https" />
<data android:host="www.YOUR-DOMAIN.com" />
<intent-filter>
</activity>
You can obtain more info about how to add the intent-filter
and it options in
the following link.
iOS is not yet supported, please, feel free to send a pull request :D
import AppIndexing from 'react-native-app-indexing'
import AppIndexing from 'react-native-app-indexing'
This project is available under the MIT license. See the LICENSE file for more info.