Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 668ebce

Browse files
Android - registerForPushNotifications not resolved. #1259
1 parent d5a53c0 commit 668ebce

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/messaging/messaging.android.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,13 @@ export function registerForPushNotifications(options?: MessagingOptions): Promis
163163
}
164164

165165
initFirebaseMessaging(options);
166-
getSenderId().then(senderId => org.nativescript.plugins.firebase.FirebasePlugin.registerForPushNotifications(senderId));
166+
167+
getSenderId()
168+
.then(senderId => {
169+
org.nativescript.plugins.firebase.FirebasePlugin.registerForPushNotifications(senderId);
170+
resolve();
171+
})
172+
.catch(e => reject(e));
167173
} catch (ex) {
168174
console.log("Error in messaging.registerForPushNotifications: " + ex);
169175
reject(ex);

0 commit comments

Comments
 (0)