Skip to content

Commit

Permalink
Remove dependency to app_review flutter package due to incompatibilit…
Browse files Browse the repository at this point in the history
…y with old version of com.google.android.play:core

Error message when uploading bundle to Google Play Store:
```
Update your com.google.android.play:core:1.8.0 Maven dependency to an
Android 14 compatible version! Your current
com.google.android.play:core:1.8.0 library is incompatible with
targetSdkVersion 34 (Android 14), which introduces a
backwards-incompatible change to broadcast receivers. As a reminder,
from August 31, 2024, Google Play requires all new app releases to
target Android 14. Update to the latest library version dependency to
avoid app crashes.
```
  • Loading branch information
rm3l committed Sep 8, 2024
1 parent e877555 commit 14dc0ee
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 35 deletions.
41 changes: 21 additions & 20 deletions mobile/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:url_launcher/url_launcher.dart';

import 'package:app_review/app_review.dart';
//import 'package:app_review/app_review.dart';

const contactEmailAddress = "apps+dev_feed@rm3l.org";

enum AppBarMenuItem { ABOUT, SEND_FEEDBACK, RATING }
//enum AppBarMenuItem { ABOUT, SEND_FEEDBACK, RATING }
enum AppBarMenuItem { ABOUT, SEND_FEEDBACK }

// final alice = Alice(showNotification: true, darkTheme: true);

Expand Down Expand Up @@ -88,12 +89,12 @@ class _DevFeedState extends State<DevFeed> with TickerProviderStateMixin {
void initState() {
super.initState();

AppReview.getAppID.then((onValue) {
setState(() {
appID = onValue;
});
print("App ID: $appID");
});
//AppReview.getAppID.then((onValue) {
// setState(() {
// appID = onValue;
// });
// print("App ID: $appID");
//});

_navigationViews = <NavigationIconView>[
NavigationIconView(
Expand Down Expand Up @@ -204,9 +205,9 @@ class _DevFeedState extends State<DevFeed> with TickerProviderStateMixin {
value: AppBarMenuItem.ABOUT, child: const Text('About')),
const PopupMenuItem<AppBarMenuItem>(
value: AppBarMenuItem.SEND_FEEDBACK,
child: const Text('Send Feedback')),
const PopupMenuItem<AppBarMenuItem>(
value: AppBarMenuItem.RATING, child: const Text('Rate this app!'))
child: const Text('Send Feedback'))
//const PopupMenuItem<AppBarMenuItem>(
// value: AppBarMenuItem.RATING, child: const Text('Rate this app!'))
]);

return Scaffold(
Expand All @@ -220,15 +221,15 @@ class _DevFeedState extends State<DevFeed> with TickerProviderStateMixin {
case AppBarMenuItem.ABOUT:
showGalleryAboutDialog(_scaffoldKey.currentContext);
break;
case AppBarMenuItem.RATING:
{
AppReview.requestReview.catchError((onError) {
Scaffold.of(context).showSnackBar(SnackBar(
content: Text("Error: ${onError.toString()}"),
));
});
}
break;
//case AppBarMenuItem.RATING:
// {
// AppReview.requestReview.catchError((onError) {
// Scaffold.of(context).showSnackBar(SnackBar(
// content: Text("Error: ${onError.toString()}"),
// ));
// });
// }
// break;
case AppBarMenuItem.SEND_FEEDBACK:
{
//TODO For now, open up the default email address,
Expand Down
14 changes: 0 additions & 14 deletions mobile/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.41.2"
app_review:
dependency: "direct main"
description:
name: app_review
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
archive:
dependency: transitive
description:
Expand Down Expand Up @@ -226,13 +219,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
http:
dependency: transitive
description:
name: http
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.2"
http_parser:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion mobile/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ dependencies:
fluro: ^2.0.5
pigment: ^1.0.4

app_review: "^2.0.1"
# app_review: "^2.1.2+1"
dio: ^3.0.10
dio_http_cache: ^0.2.11
# alice: ^0.1.5
Expand Down

0 comments on commit 14dc0ee

Please sign in to comment.