Closed afkcodes closed 3 years ago
same issue Have you solved it?
@afkcodes @Desintegrator hey what kind of problem do you have?
Refer here for in app update testing https://developer.android.com/guide/playcore/in-app-updates/test
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:
any update on this? Does not seem to work for me as well. I can see update available on playstore. but my app does not show app prompt
@shubhamdeol are you testing it via the internal app sharing? it will not work if you are not using that. and make sure the internal app sharing version of app is lower than the current production version
@gedeagas Yes. I am testing via internal app sharing
Your second point. make sure the internal app sharing version of app is lower than the current production version
Its not possible to have app version lower in internal release channel than production channel. Playstore does not let user update app with lower version name.
Its not possible to have app version lower in internal release channel than production channel. Playstore does not let user update app with lower version name.
Please use Internal App Sharing
not internal release channel
. You can acess those from here https://play.google.com/console/u/0/internal-app-sharing/.
The apk that you upload via Internal App Sharing
will not be published to the Internal Track
on Google Play Store.
Internal app sharing lets you quickly share app bundles and APKs with your internal team using a link. With Internal app sharing Your version codes don't need to be unique, and you can even upload debuggable artifacts
You can read more about this on https://play.google.com/console/about/internalappsharing/
@gedeagas Thanks a lot. This does make sense to me now. I will try this out.
@gedeagas Thanks a lot. This does make sense to me now. I will try this out.
Sure, glad to be of help.
@gedeagas I tried on internal app sharing getting error No update available
. Do I need to install google play core separately?
here is how I am using this
const eventEmitter = new NativeEventEmitter(NativeModules.AndroidInappUpdates);
eventEmitter.addListener('installStatus', (event: number) => {
//11 is downloaded status
if (event === 11) {
alert('app updated successfully');
onCompleteUpdate();
}
});
const checkForUpdate = async () => {
try {
const checkUpdateResult = await checkUpdateAvailability();
alert('first' + checkUpdateResult);
if (checkUpdateResult === 'Update available') {
const updateFlowResult = await startUpdateFlow('flexible');
alert(JSON.stringify(updateFlowResult));
}
} catch (error) {
alert(JSON.stringify(error));
}
};
Inside useEffect
React.useEffect(() => {
const timeout = setTimeout(() => {
checkForUpdate();
}, 5000);
return () => {
clearTimeout(timeout);
};
}, []);
I also added
implementation 'com.google.android.play:core:1.7.3'
inside app/build.gradle
Also, Do I need to increase version name too along with version code for second build ?
Also, Do I need to increase version name too along with version code for second build ?
HI @shubhamdeol ,am also facing this issue. please let me know the procedure if it's working fine Thanks in advance
@black-nijar I had to switch to another library. sp-react-native-in-app-updates
Hello I have used this pacakage but it seems it only says no update available though when i see in playstore the update is available. Anything that i am missing or doing wrong ? Any help would be appeciated.