From 8b88463efe69f3b4006a58c73878c8fd1e7507d1 Mon Sep 17 00:00:00 2001 From: OkaykOrhmn Date: Sat, 17 Aug 2024 10:46:03 +0330 Subject: [PATCH] Rhmn -- 27/05/1403 -- fix notification firebase, --- android/app/build.gradle | 33 +- android/app/google-services.json | 7 + android/app/src/main/AndroidManifest.xml | 23 +- .../kotlin/com/example/didvan/MainActivity.kt | 7 + android/build.gradle | 5 +- deployment/dev.yaml | 14 - deployment/test.yaml | 14 - firebase.json | 1 + lib/firebase_options.dart | 76 ++++ lib/main.dart | 80 ++--- lib/models/day_time.dart | 14 +- lib/models/notification_data.dart | 49 +++ lib/models/notification_message.dart | 32 +- lib/providers/user.dart | 19 +- lib/routes/route_generator.dart | 4 +- lib/services/app_initalizer.dart | 94 ++--- lib/services/media/audio_handler.dart | 133 ------- lib/services/media/media.dart | 60 ++-- lib/services/network/request.dart | 2 +- .../awsome_notification_controller.dart | 44 --- .../awsome/awsome_notification_handler.dart | 305 ---------------- .../fcm/firebase_notification_handler.dart | 72 ---- lib/services/notification/firebase_api.dart | 50 +++ .../lc/local_notification_service.dart | 130 ------- .../lc/show_notification_handler.dart | 40 --- .../notification/notification_service.dart | 166 +++++++++ lib/views/authentication/authentication.dart | 2 + .../authentication/screens/password.dart | 3 +- .../screens/reset_password.dart | 21 +- .../authentication/screens/verification.dart | 2 + .../customize_category_state.dart | 48 ++- lib/views/direct/direct.dart | 2 + lib/views/direct/widgets/audio_widget.dart | 30 +- lib/views/home/home.dart | 72 ++-- .../home/new_statistic/stock/new_stock.dart | 2 +- ...wStock_state.dart => new_stock_state.dart} | 2 - lib/views/mentions/mentions.dart | 12 +- lib/views/mentions/mentions_state.dart | 6 +- .../notification_time_state.dart | 25 +- .../studio_details/studio_details.mobile.dart | 54 ++- .../studio_details/studio_details.web.dart | 2 + .../studio_details/studio_details_state.dart | 4 +- .../widgets/details_tab_bar.dart | 2 + .../profile/general_settings/settings.dart | 93 ----- .../widgets/audio/audio_player_widget.dart | 85 ++++- lib/views/widgets/audio/audio_slider.dart | 60 ++-- lib/views/widgets/audio/player_navbar.dart | 4 +- lib/views/widgets/didvan/bnb.dart | 23 +- lib/views/widgets/didvan/scaffold.dart | 24 +- .../notification_dynamic_dialog.dart | 6 +- pubspec.lock | 331 +++++++----------- pubspec.yaml | 23 +- 52 files changed, 936 insertions(+), 1476 deletions(-) delete mode 100644 deployment/dev.yaml delete mode 100644 deployment/test.yaml create mode 100644 firebase.json create mode 100644 lib/firebase_options.dart create mode 100644 lib/models/notification_data.dart delete mode 100644 lib/services/media/audio_handler.dart delete mode 100644 lib/services/notification/awsome/awsome_notification_controller.dart delete mode 100644 lib/services/notification/awsome/awsome_notification_handler.dart delete mode 100644 lib/services/notification/fcm/firebase_notification_handler.dart create mode 100644 lib/services/notification/firebase_api.dart delete mode 100644 lib/services/notification/lc/local_notification_service.dart delete mode 100644 lib/services/notification/lc/show_notification_handler.dart create mode 100644 lib/services/notification/notification_service.dart rename lib/views/home/new_statistic/stock/{newStock_state.dart => new_stock_state.dart} (98%) diff --git a/android/app/build.gradle b/android/app/build.gradle index 189bbb2..0b47941 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -22,6 +22,9 @@ if (flutterVersionName == null) { } apply plugin: 'com.android.application' +// START: FlutterFire Configuration +apply plugin: 'com.google.gms.google-services' +// END: FlutterFire Configuration apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" @@ -32,7 +35,8 @@ if (keystorePropertiesFile.exists()) { } android { - compileSdkVersion 34 + namespace "com.didvan.didvanapp" + compileSdk 34 ndkVersion "25.1.8937393" compileOptions { @@ -53,7 +57,7 @@ android { applicationId "com.didvan.didvanapp" minSdkVersion 24 //noinspection ExpiredTargetSdkVersion - targetSdkVersion 30 + targetSdkVersion 31 versionCode flutterVersionCode.toInteger() versionName flutterVersionName } @@ -79,6 +83,22 @@ android { buildFeatures { viewBinding true } + + splits { + //configure apks based on ABI + abi { + enable true + reset() + include "x86", "x86_64", "armeabi-v7a", "arm64-v8a" + universalApk true + + } +// density { +// enable true +// reset() +// include "mdpi", "hdpi", "xhdpi", "xxhdpi", "xxxhdpi" +// } + } } flutter { @@ -86,10 +106,11 @@ flutter { } dependencies { - implementation platform('com.google.firebase:firebase-bom:29.1.0') - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + // implementation platform('com.google.firebase:firebase-bom:29.1.0') + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.10" implementation 'com.google.code.gson:gson:2.10.1' -// implementation 'com.github.bumptech.glide:glide:4.16.0' implementation 'com.squareup.picasso:picasso:2.8' - implementation 'com.android.support:cardview-v7:28.0.0' + implementation "androidx.room:room-runtime:2.2.5" + implementation "androidx.sqlite:sqlite-framework:2.1.0" + implementation "androidx.sqlite:sqlite:2.1.0" } diff --git a/android/app/google-services.json b/android/app/google-services.json index 5cb370e..db46785 100644 --- a/android/app/google-services.json +++ b/android/app/google-services.json @@ -29,6 +29,13 @@ { "client_id": "935017686266-lebnol7rb05oi9h0mripb41c892d2gij.apps.googleusercontent.com", "client_type": 3 + }, + { + "client_id": "935017686266-54hu01v9cc5pqpgofo1gk2n3hegj4r2m.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "com.didvan.didvanapp" + } } ] } diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 66ac4b8..4401ef0 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -8,14 +8,14 @@ - - + + + - + android:permission="android.permission.BIND_JOB_SERVICE" android:exported="true" /> + + + + +