WIP
This commit is contained in:
parent
3496605f3f
commit
d0b59b0b0a
|
@ -9,6 +9,7 @@
|
|||
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
|
||||
<application
|
||||
android:label="FRE ACCESS HUB"
|
||||
|
@ -46,13 +47,13 @@
|
|||
android:name="io.flutter.embedding.android.SplashScreenDrawable"
|
||||
android:resource="@drawable/launch_background"
|
||||
/>
|
||||
<!-- Deep linking -->
|
||||
<meta-data android:name="flutter_deeplinking_enabled" android:value="true" />
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
<!-- Deep linking -->
|
||||
<meta-data android:name="flutter_deeplinking_enabled" android:value="true" />
|
||||
|
||||
<intent-filter android:autoVerify="true">
|
||||
<action android:name="FLUTTER_NOTIFICATION_CLICK" />
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
@ -60,6 +61,12 @@
|
|||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:scheme="frehub" android:host="frehub.com" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="FLUTTER_NOTIFICATION_CLICK" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
|
||||
|
||||
|
||||
</activity>
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import 'dart:developer';
|
||||
|
||||
import 'package:firebase_core/firebase_core.dart';
|
||||
import 'package:firebase_messaging/firebase_messaging.dart';
|
||||
import 'package:hub/app_state.dart';
|
||||
import 'package:hub/backend/api_requests/api_calls.dart';
|
||||
|
@ -40,6 +41,18 @@ class FirebaseMessagingService {
|
|||
FirebaseMessaging.onMessage.listen((RemoteMessage message) {
|
||||
handleMessage(message);
|
||||
});
|
||||
|
||||
FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) {
|
||||
log('A Message was opened: $message');
|
||||
});
|
||||
|
||||
FirebaseMessaging.instance
|
||||
.getInitialMessage()
|
||||
.then((RemoteMessage? message) {
|
||||
if (message != null) {
|
||||
log('A Message was opened: $message');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Future<void> updateDeviceToken() async {
|
||||
|
|
|
@ -73,9 +73,10 @@ class DefaultFirebaseOptions {
|
|||
projectId: 'accessmoblie-da839',
|
||||
databaseURL: 'https://accessmoblie-da839.firebaseio.com',
|
||||
storageBucket: 'accessmoblie-da839.appspot.com',
|
||||
androidClientId: '187064172787-7et0qu5p2qtmisvqgndn3kfi1b7u9ifl.apps.googleusercontent.com',
|
||||
iosClientId: '187064172787-c5gs7fvp78om9r7dofkjn2qmpumkuvig.apps.googleusercontent.com',
|
||||
androidClientId:
|
||||
'187064172787-7et0qu5p2qtmisvqgndn3kfi1b7u9ifl.apps.googleusercontent.com',
|
||||
iosClientId:
|
||||
'187064172787-c5gs7fvp78om9r7dofkjn2qmpumkuvig.apps.googleusercontent.com',
|
||||
iosBundleId: 'br.com.freaccess.hub',
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue