Implement Android In-App Update API In React Native
0 0
Read Time:1 Minute, 51 Second

Implement Android In-App Update API In React Native

react-native-android-inapp-updates

React Native implementation of the Android In-App Update API. For more information on InApp Updates, you can check the official documentation.

You will need to test the app via Internal App Sharing

Use internal app sharing to test in-app updates by performing the following steps:

  1. Verify that your test device has a version of your app that supports in-app updates and was installed via an internal app sharing URL.
  2. To share your app internally, follow the Play Console instructions. Upload a version of your application that has a higher version code than the one you already have on the test device.
  3. Click the internal app sharing link for the new version of your app on the test device, but don’t install it from the Play Store page that displays after clicking the link.
  4. Open the app from the app drawer or the home screen of your device. Your app should now have the update, and you may test your in-app update implementation.

Requirements For Android Update API In React Native:

  • In-app updates work only with devices running Android 5.0 (API level 21) or higher.
  • In-app updates can only work when signed with the same signing key as your app on the play store.

Installation:

Using NPM:

npm install @gurukumparan/react-native-android-inapp-updates --save

OR

Using Yarn:

yarn add @gurukumparan/react-native-android-inapp-updates

For React Native V 0.60.0 or above:

React Native V 0.60.0 Or Above Supports AutoLinking, so there is no need to run the linking process.

For React Native V 0.59 Or Below:

react-native link @gurukumparan/react-native-android-inapp-updates

Usage:

import {startUpdateFlow} from '@gurukumparan/react-native-android-inapp-updates';
const updateModes = 'flexible';

try {
    const result = await startUpdateFlow(updateModes);
} catch (e) {
    console.log('error:', e);
}

 

Reference:

GitHub:
https://github.com/kumparan/react-native-android-inapp-updates

If You Have Any Problem Or Doubts,
Please Do Ask Or Suggest In Comment.


Do Follow Us on:

Facebook.com

Twitter.com

Also Checkout: An “atomic CSS” style toolkit for React Native

Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

By Akash Kothari

I am passionate about my work. Because I love what I do, I have a steady source of motivation that drives me to do my best. In my last job, this passion led me to challenge myself daily and learn new skills that helped me to do better work

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

One thought on “Implement Android In-App Update API In React Native

Leave a Reply

%d bloggers like this: