diff --git a/android/build.gradle b/android/build.gradle index 150f685..7e549f9 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,3 +1,5 @@ +package android + group 'fr.g123k.flutterappbadge.flutterappbadger' version '1.0-SNAPSHOT' @@ -22,7 +24,7 @@ rootProject.allprojects { apply plugin: 'com.android.library' android { - compileSdkVersion 29 + compileSdk 34 defaultConfig { minSdkVersion 16 diff --git a/android/settings.gradle b/android/settings.gradle index 3c427f9..bc4f5d5 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -1 +1,3 @@ +package android + rootProject.name = 'flutter_app_badger' diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml index 6a3dcb8..4af9c8a 100644 --- a/android/src/main/AndroidManifest.xml +++ b/android/src/main/AndroidManifest.xml @@ -1,3 +1 @@ - - + diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 1f18553..b18efcf 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -15,17 +15,16 @@ apply plugin: 'com.android.application' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 29 + compileSdk 34 lintOptions { disable 'InvalidPackage' } defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "fr.g123k.flutterappbadger.flutterappbadgerexample" minSdkVersion 16 - targetSdkVersion 29 + targetSdkVersion 34 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" @@ -38,6 +37,10 @@ android { signingConfig signingConfigs.debug } } + + if (project.android.hasProperty('namespace')) { + namespace 'fr.g123k.flutterappbadge.flutterappbadger' + } } flutter { diff --git a/example/android/build.gradle b/example/android/build.gradle index 9e4e79b..096666c 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -1,3 +1,5 @@ +package example.android + buildscript { repositories { google() diff --git a/example/lib/main.dart b/example/lib/main.dart index 95facd4..e4675f1 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -54,13 +54,13 @@ class _MyAppState extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ new Text('Badge supported: $_appBadgeSupported\n'), - new RaisedButton( + new MaterialButton( child: new Text('Add badge'), onPressed: () { _addBadge(); }, ), - new RaisedButton( + new MaterialButton( child: new Text('Remove badge'), onPressed: () { _removeBadge();