V 1.1.24+1 Push Notification android, Smartlook activate
This commit is contained in:
@@ -62,10 +62,20 @@ class FirebaseApi with logging.Logging {
|
||||
badge: true,
|
||||
sound: true,
|
||||
);
|
||||
this.firebaseRegToken = await FirebaseMessaging.instance.getToken();
|
||||
this.firebaseRegToken = await FirebaseMessaging.instance.getToken();
|
||||
Cache().firebaseMessageToken = firebaseRegToken;
|
||||
FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler);
|
||||
log("FirebaseMessaging token $firebaseRegToken");
|
||||
|
||||
FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler);
|
||||
FirebaseMessaging.onMessage.listen((RemoteMessage message) {
|
||||
print('Got a message whilst in the foreground!');
|
||||
print('Message data: ${message.data}');
|
||||
|
||||
if (message.notification != null) {
|
||||
print('Message also contained a notification: ${message.notification}');
|
||||
}
|
||||
});
|
||||
|
||||
} catch (e) {
|
||||
// Set `_error` state to true if Firebase initialization fails
|
||||
log("Error initializing Firebase");
|
||||
|
||||
Reference in New Issue
Block a user