You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Dialog showing up on iOS, but not on a physical Android device.
Expected behavior
Dialog should show.
Many thanks for your help!
Source code
import 'package:flutter/material.dart';
import 'package:rate_my_app/rate_my_app.dart';
RateMyApp rateMyApp = RateMyApp (
preferencesPrefix: 'ratemyapp_',
minDays: 0,
minLaunches: 4,
remindDays: 2,
remindLaunches: 5
);
void main() {
WidgetsFlutterBinding.ensureInitialized();
runApp(TestApp());
}
class TestApp extends StatefulWidget {
@override
_TestAppState createState() => _TestAppState();
}
class _TestAppState extends State<TestApp> {
@override
void initState() {
super.initState();
rateMyApp.init().then((_){
if(rateMyApp.shouldOpenDialog){ //conditions check if user already rated the app
rateMyApp.showStarRateDialog(
context,
title: 'How are you finding the app?',
message: 'We REALLY want to hear your thoughts',
actionsBuilder: (_, stars){
return [ // Returns a list of actions (that will be shown at the bottom of the dialog).
FlatButton(
child: Text('OK'),
onPressed: () async {
print('Thanks for the ' + (stars == null ? '0' : stars.round().toString()) + ' star(s) !');
if(stars != null && (stars == 4 || stars == 5)){
//if the user stars is equal to 4 or five
LaunchReview.launch();
} else {
// else you can redirect the user to a page in your app to tell you how you can make the app better
}
// You can handle the result as you want (for instance if the user puts 1 star then open your contact page, if he puts more then open the store page, etc...).
// This allows to mimic the behavior of the default "Rate" button. See "Advanced > Broadcasting events" for more information :
await rateMyApp.callEvent(RateMyAppEventType.rateButtonPressed);
Navigator.pop<RateMyAppDialogButton>(context, RateMyAppDialogButton.rate);
},
),
];
},
dialogStyle: DialogStyle(
titleAlign: TextAlign.center,
messageAlign: TextAlign.center,
messagePadding: EdgeInsets.only(bottom: 20.0),
),
starRatingOptions: StarRatingOptions(),
onDismissed: () => rateMyApp.callEvent(RateMyAppEventType.laterButtonPressed),
);
}
});
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(),
body: Center(child: Text('test')),
),
);
}
}
Console messages
| | | I/PlayCore(21680): UID: [10307] PID: [21680] ReviewService : requestInAppReview (com.test.testapp)
| | | I/PlayCore(21680): UID: [10307] PID: [21680] ReviewService : Initiate binding to the service.
| | | I/PlayCore(21680): UID: [10307] PID: [21680] ReviewService : ServiceConnectionImpl.onServiceConnected(ComponentInfo{com.android.vending/com.google.android.finsky.inappreviewservice.InAppReviewService})
| | | I/PlayCore(21680): UID: [10307] PID: [21680] ReviewService : linkToDeath
| | | I/PlayCore(21680): UID: [10307] PID: [21680] ReviewService : Unbind from service.
| | | I/PlayCore(21680): UID: [10307] PID: [21680] OnRequestInstallCallback : onGetLaunchReviewFlowInfo
| | | I/HwPointEventFilter(21680): do not support AFT because of no config
The text was updated successfully, but these errors were encountered:
Describe the bug
Dialog showing up on iOS, but not on a physical Android device.
Expected behavior
Dialog should show.
Many thanks for your help!
Source code
Console messages
The text was updated successfully, but these errors were encountered: