Closed bloggerklik closed 9 months ago
Hello,
useEffect(()=>{
lanuchReview()
});
function lanuchReview(){ const date_lanuched_review = await AsyncStorage.getItem('date_lanuched_review'); if(date_lanuched_review){ const lastDateLaunchedReview = moment(date_lanuched_review).toISOString(); const today = moment(); if (today.diff(lastDateLaunchedReview, 'days') > 8 && level >=3 ) { InAppReview.RequestInAppReview() .then((hasFlowFinishedSuccessfully: boolean) => { if (hasFlowFinishedSuccessfully) { AsyncStorage.setItem("date_lanuched_review", new Date()); } }) .catch((error: any) => { //we continue our app flow. // we have some errors that could happen while launching InAppReview, // Check the table for errors and code numbers that can return in the catch. console.log(error); }); } } else if(level >= 3) { InAppReview.RequestInAppReview() .then((hasFlowFinishedSuccessfully: boolean) => { if (hasFlowFinishedSuccessfully) { AsyncStorage.setItem("date_lanuched_review", new Date()); } }) .catch((error: any) => { //we continue our app flow. // we have some errors that could happen while launching InAppReview, // Check the table for errors and code numbers that can return in the catch. console.log(error); }); } }
@MinaSamir11 Thanks for your answer. The thing I don't understand is this. We do not know whether the user has reviewed before or not. Even if the user reviewed here, InAppReview.RequestInAppReview() is run continuously in the following days. Is this normal? Won't Google and Apple ban my app?
Follow this note: https://github.com/MinaSamir11/react-native-in-app-review#quotas
Hello, I have a game. If the user has reached level 3, I will ask him to do a review. When should I run InAppReview.RequestInAppReview() in this case?
I want to use Code 1 but I have concerns. It is run every time the user opens the application. There will be constant requests. It will still work when the user clicks later or if the user has already reviewed it. Is there any harm in that?
Code 2 seems to be more secure. However, if the user tapped later and the user leveled up, it will not be displayed later.
Thanks.
Code 1
Code 2