diff --git a/android/app/build.gradle b/android/app/build.gradle index 01311d8..9972eb6 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -1,5 +1,9 @@ plugins { id "com.android.application" + // START: FlutterFire Configuration + id 'com.google.gms.google-services' + id 'com.google.firebase.crashlytics' + // END: FlutterFire Configuration id "kotlin-android" id "dev.flutter.flutter-gradle-plugin" } @@ -27,7 +31,7 @@ def keystoreProperties = new Properties() keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) android { - namespace "com.now.wallpaper" + namespace "com.hello.wallpaper" compileSdk flutter.compileSdkVersion ndkVersion flutter.ndkVersion @@ -46,7 +50,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.now.wallpaper" + applicationId "com.hello.wallpaper" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. // minSdkVersion flutter.minSdkVersion @@ -54,6 +58,9 @@ android { targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName + + // Enable MultiDex. + multiDexEnabled true } signingConfigs { @@ -79,6 +86,15 @@ android { signingConfig signingConfigs.release } } + + android.applicationVariants.all { variant -> + variant.outputs.all { output -> + if (!variant.buildType.isDebuggable()) { + // 配置APK输出文件名 + outputFileName = "hello-wallpaper-${flutterVersionName}-${variant.buildType.name}.apk" + } + } + } } flutter { diff --git a/android/app/google-services.json b/android/app/google-services.json new file mode 100644 index 0000000..f2e9d63 --- /dev/null +++ b/android/app/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "318284530945", + "project_id": "nowwallpaper", + "storage_bucket": "nowwallpaper.appspot.com" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:318284530945:android:c7dd2abf520a9840250700", + "android_client_info": { + "package_name": "com.hello.wallpaper" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyDP6CpkN3HMpCofXlToug-hadYpTLEgE0E" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index ef4faad..73b2f9e 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -5,8 +5,7 @@ + tools:ignore="ScopedStorage"/> + android:requestLegacyExternalStorage="true" + android:enableOnBackInvokedCallback="true" + tools:targetApi="tiramisu"> ("path") val wallpaperType = call.argument("wallpaperType") // 0 for home screen, 1 for lock screen, 2 for both diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/android/app/src/main/res/drawable-v21/launch_background.xml index 08c3b05..aaf4ab9 100644 --- a/android/app/src/main/res/drawable-v21/launch_background.xml +++ b/android/app/src/main/res/drawable-v21/launch_background.xml @@ -1,6 +1,7 @@ - + + diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml index 8c48eed..c339068 100644 --- a/android/app/src/main/res/drawable/launch_background.xml +++ b/android/app/src/main/res/drawable/launch_background.xml @@ -1,6 +1,7 @@ - + + ¬ diff --git a/android/app/src/main/res/mipmap-hdpi/launcher_icon.png b/android/app/src/main/res/mipmap-hdpi/launcher_icon.png index 7a0e437..59bed6d 100644 Binary files a/android/app/src/main/res/mipmap-hdpi/launcher_icon.png and b/android/app/src/main/res/mipmap-hdpi/launcher_icon.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/launcher_icon.png b/android/app/src/main/res/mipmap-mdpi/launcher_icon.png index 4ed2866..a894620 100644 Binary files a/android/app/src/main/res/mipmap-mdpi/launcher_icon.png and b/android/app/src/main/res/mipmap-mdpi/launcher_icon.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png index e6a1ee1..2452004 100644 Binary files a/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png and b/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png index 6b53194..061a13e 100644 Binary files a/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png and b/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png index 12b1bf2..e6971f2 100644 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png and b/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png differ diff --git a/android/app/src/main/res/values-night-v21/styles.xml b/android/app/src/main/res/values-night-v21/styles.xml new file mode 100644 index 0000000..ad8e5ff --- /dev/null +++ b/android/app/src/main/res/values-night-v21/styles.xml @@ -0,0 +1,12 @@ + + + + + \ No newline at end of file diff --git a/android/app/src/main/res/values-night-v27/styles.xml b/android/app/src/main/res/values-night-v27/styles.xml new file mode 100644 index 0000000..2ec707e --- /dev/null +++ b/android/app/src/main/res/values-night-v27/styles.xml @@ -0,0 +1,13 @@ + + + + + \ No newline at end of file diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml index 674f087..245640e 100644 --- a/android/app/src/main/res/values-night/styles.xml +++ b/android/app/src/main/res/values-night/styles.xml @@ -6,9 +6,6 @@ the Flutter engine draws its first frame --> @drawable/launch_background true - shortEdges - @android:color/transparent - @android:color/transparent + @drawable/launch_background + true + @android:color/transparent + @android:color/transparent + + \ No newline at end of file diff --git a/android/app/src/main/res/values-v27/styles.xml b/android/app/src/main/res/values-v27/styles.xml new file mode 100644 index 0000000..1ff3c89 --- /dev/null +++ b/android/app/src/main/res/values-v27/styles.xml @@ -0,0 +1,13 @@ + + + + + \ No newline at end of file diff --git a/android/app/src/main/res/values/colors.xml b/android/app/src/main/res/values/colors.xml new file mode 100644 index 0000000..f8a2440 --- /dev/null +++ b/android/app/src/main/res/values/colors.xml @@ -0,0 +1,4 @@ + + + #0A0A14 + \ No newline at end of file diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml index 907ebe7..c9318cc 100644 --- a/android/app/src/main/res/values/strings.xml +++ b/android/app/src/main/res/values/strings.xml @@ -1,4 +1,4 @@ - Now wallpaper + Hello Wallpaper \ No newline at end of file diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml index 7bb20df..9accca7 100644 --- a/android/app/src/main/res/values/styles.xml +++ b/android/app/src/main/res/values/styles.xml @@ -6,9 +6,6 @@ the Flutter engine draws its first frame --> @drawable/launch_background true - shortEdges - @android:color/transparent - @android:color/transparent