fluffychat/scripts/enable-android-google-services.patch

92 lines
3.3 KiB
Diff
Raw Normal View History

diff --git a/android/app/build.gradle b/android/app/build.gradle
2022-04-14 07:34:55 +02:00
index ad9ffb87..37baafb1 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -44,7 +44,7 @@ android {
defaultConfig {
applicationId "chat.fluffy.fluffychat"
- minSdkVersion 16
+ minSdkVersion 19
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
2022-04-14 07:34:55 +02:00
@@ -82,11 +82,11 @@ flutter {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
- //implementation 'com.google.firebase:firebase-messaging:19.0.1' // Workaround for https://github.com/microg/android_packages_apps_GmsCore/issues/313#issuecomment-617651698
+ implementation 'com.google.firebase:firebase-messaging:19.0.1' // Workaround for https://github.com/microg/android_packages_apps_GmsCore/issues/313#issuecomment-617651698
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
implementation 'androidx.multidex:multidex:2.0.1'
}
-//apply plugin: 'com.google.gms.google-services'
+apply plugin: 'com.google.gms.google-services'
diff --git a/android/app/src/main/kotlin/chat/fluffy/fluffychat/FcmPushService.kt b/android/app/src/main/kotlin/chat/fluffy/fluffychat/FcmPushService.kt
index d9930f55..510e9845 100644
--- a/android/app/src/main/kotlin/chat/fluffy/fluffychat/FcmPushService.kt
+++ b/android/app/src/main/kotlin/chat/fluffy/fluffychat/FcmPushService.kt
@@ -1,4 +1,4 @@
-/*package chat.fluffy.fluffychat
+package chat.fluffy.fluffychat
import com.famedly.fcm_shared_isolate.FcmSharedIsolateService
@@ -33,4 +33,3 @@ class FcmPushService : FcmSharedIsolateService() {
}
}
}
-*/
\ No newline at end of file
diff --git a/android/build.gradle b/android/build.gradle
index 85aa8647..3b7e09e7 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -8,7 +8,7 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:4.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
- //classpath 'com.google.gms:google-services:4.3.8'
+ classpath 'com.google.gms:google-services:4.3.8'
}
}
diff --git a/lib/utils/background_push.dart b/lib/utils/background_push.dart
2022-04-14 07:34:55 +02:00
index 00ca2aaa..8bb8a156 100644
--- a/lib/utils/background_push.dart
+++ b/lib/utils/background_push.dart
2022-04-14 07:34:55 +02:00
@@ -39,7 +39,7 @@ import '../config/setting_keys.dart';
import 'famedlysdk_store.dart';
2021-10-26 19:00:00 +02:00
import 'platform_infos.dart';
-//import 'package:fcm_shared_isolate/fcm_shared_isolate.dart';
+import 'package:fcm_shared_isolate/fcm_shared_isolate.dart';
2021-10-26 19:00:00 +02:00
class NoTokenException implements Exception {
String get cause => 'Cannot get firebase token';
2022-04-14 07:34:55 +02:00
@@ -65,7 +65,7 @@ class BackgroundPush {
2022-04-14 07:34:55 +02:00
final pendingTests = <String, Completer<void>>{};
- final dynamic firebase = null; //FcmSharedIsolate();
+ final dynamic firebase = FcmSharedIsolate();
DateTime? lastReceivedPush;
diff --git a/pubspec.yaml b/pubspec.yaml
2022-04-14 07:34:55 +02:00
index c6295788..8dd17ce4 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
2022-04-14 07:34:55 +02:00
@@ -24,7 +24,7 @@ dependencies:
email_validator: ^2.0.1
2022-03-06 11:39:31 +01:00
emoji_picker_flutter: ^1.1.2
2021-11-11 19:19:59 +01:00
encrypt: ^5.0.1
2022-04-14 07:34:55 +02:00
- #fcm_shared_isolate: ^0.1.0
+ fcm_shared_isolate: ^0.1.0
file_picker_cross: ^4.6.0
flutter:
2021-12-27 12:37:16 +01:00
sdk: flutter