2021-09-24 12:19:02 +02:00
|
|
|
diff --git a/android/app/build.gradle b/android/app/build.gradle
|
2022-02-17 08:17:55 +01:00
|
|
|
index 4e018b38..eebf7582 100644
|
2021-09-24 12:19:02 +02:00
|
|
|
--- a/android/app/build.gradle
|
|
|
|
+++ b/android/app/build.gradle
|
2022-02-17 08:17:55 +01:00
|
|
|
@@ -44,7 +44,7 @@ android {
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
applicationId "chat.fluffy.fluffychat"
|
|
|
|
- minSdkVersion 16
|
|
|
|
+ minSdkVersion 19
|
|
|
|
targetSdkVersion 30
|
|
|
|
versionCode flutterVersionCode.toInteger()
|
|
|
|
versionName flutterVersionName
|
|
|
|
@@ -81,7 +81,7 @@ flutter {
|
2021-09-24 14:38:58 +02:00
|
|
|
|
|
|
|
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'
|
2022-02-17 08:17:55 +01:00
|
|
|
@@ -89,4 +89,4 @@ dependencies {
|
2022-02-15 09:25:13 +01:00
|
|
|
implementation 'androidx.multidex:multidex:2.0.1'
|
2021-09-24 12:19:02 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
-//apply plugin: 'com.google.gms.google-services'
|
|
|
|
+apply plugin: 'com.google.gms.google-services'
|
2021-09-26 09:01:59 +02:00
|
|
|
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
|
2022-02-17 08:17:55 +01:00
|
|
|
index ee40b78d..ec7dd1a9 100644
|
2021-09-26 09:01:59 +02:00
|
|
|
--- a/android/app/src/main/AndroidManifest.xml
|
|
|
|
+++ b/android/app/src/main/AndroidManifest.xml
|
2022-02-17 08:17:55 +01:00
|
|
|
@@ -103,12 +103,12 @@
|
2021-09-26 09:01:59 +02:00
|
|
|
|
|
|
|
</activity>
|
|
|
|
|
|
|
|
- <!-- <service android:name=".FcmPushService"
|
|
|
|
+ <service android:name=".FcmPushService"
|
|
|
|
android:exported="false">
|
|
|
|
<intent-filter>
|
|
|
|
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
|
|
|
|
</intent-filter>
|
|
|
|
- </service> -->
|
|
|
|
+ </service>
|
|
|
|
|
|
|
|
<receiver android:exported="true" android:enabled="true" android:name=".UnifiedPushReceiver">
|
|
|
|
<intent-filter>
|
2021-09-24 16:16:04 +02:00
|
|
|
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
|
2021-09-24 12:19:02 +02:00
|
|
|
diff --git a/android/build.gradle b/android/build.gradle
|
2022-02-17 08:17:55 +01:00
|
|
|
index 85aa8647..3b7e09e7 100644
|
2021-09-24 12:19:02 +02:00
|
|
|
--- 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'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-09-24 16:16:04 +02:00
|
|
|
diff --git a/lib/utils/background_push.dart b/lib/utils/background_push.dart
|
2022-02-17 08:17:55 +01:00
|
|
|
index 3347f176..e304abb4 100644
|
2021-09-24 16:16:04 +02:00
|
|
|
--- a/lib/utils/background_push.dart
|
|
|
|
+++ b/lib/utils/background_push.dart
|
2021-10-26 20:44:23 +02:00
|
|
|
@@ -39,7 +39,7 @@ import 'famedlysdk_store.dart';
|
2021-10-26 19:00:00 +02:00
|
|
|
import 'matrix_sdk_extensions.dart/matrix_locals.dart';
|
|
|
|
import 'platform_infos.dart';
|
2021-09-24 16:16:04 +02:00
|
|
|
|
|
|
|
-//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-01-29 12:35:03 +01:00
|
|
|
@@ -117,7 +117,7 @@ class BackgroundPush {
|
2021-09-24 16:16:04 +02:00
|
|
|
setupPush();
|
|
|
|
}
|
|
|
|
|
2022-01-29 12:35:03 +01:00
|
|
|
- final dynamic _fcmSharedIsolate = null; //FcmSharedIsolate();
|
|
|
|
+ final dynamic _fcmSharedIsolate = FcmSharedIsolate();
|
2021-09-24 16:16:04 +02:00
|
|
|
|
2022-01-29 12:35:03 +01:00
|
|
|
StreamSubscription<LoginState>? onLogin;
|
|
|
|
StreamSubscription<SyncUpdate>? onRoomSync;
|
2021-09-24 16:16:04 +02:00
|
|
|
diff --git a/pubspec.yaml b/pubspec.yaml
|
2022-02-17 08:17:55 +01:00
|
|
|
index 73b9eca2..5e6f9f16 100644
|
2021-09-24 16:16:04 +02:00
|
|
|
--- a/pubspec.yaml
|
|
|
|
+++ b/pubspec.yaml
|
2022-02-17 08:17:55 +01:00
|
|
|
@@ -25,8 +25,8 @@ dependencies:
|
2021-09-24 16:16:04 +02:00
|
|
|
email_validator: ^2.0.1
|
2022-02-15 09:25:13 +01:00
|
|
|
emoji_picker_flutter: ^1.1.1
|
2021-11-11 19:19:59 +01:00
|
|
|
encrypt: ^5.0.1
|
2021-09-24 16:16:04 +02:00
|
|
|
- #fcm_shared_isolate:
|
|
|
|
- # git: https://gitlab.com/famedly/libraries/fcm_shared_isolate.git
|
|
|
|
+ fcm_shared_isolate:
|
|
|
|
+ git: https://gitlab.com/famedly/libraries/fcm_shared_isolate.git
|
2021-10-09 08:13:10 +02:00
|
|
|
file_picker_cross: ^4.5.0
|
2021-09-24 16:16:04 +02:00
|
|
|
flutter:
|
2021-12-27 12:37:16 +01:00
|
|
|
sdk: flutter
|
2022-02-17 08:17:55 +01:00
|
|
|
|