[android,js] misc messaging
This commit is contained in:
parent
605a7515aa
commit
7650ae42e4
|
@ -219,7 +219,8 @@ public class RNFirebaseLocalMessagingHelper {
|
|||
return;
|
||||
}
|
||||
|
||||
Long fireDate = bundle.getLong("fire_date", Math.round(bundle.getDouble("fire_date")));
|
||||
Long fireDate = Math.round(bundle.getDouble("fire_date"));
|
||||
|
||||
if (fireDate == 0) {
|
||||
Log.e(TAG, "failed to schedule notification because fire date is missing");
|
||||
return;
|
||||
|
|
|
@ -175,10 +175,21 @@ export default class Messaging extends Base {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set notification count badge number
|
||||
* Request notification permission
|
||||
* @platforms ios
|
||||
* @returns {*|Promise.<*>}
|
||||
*/
|
||||
setBadgeNumber() {
|
||||
FirebaseMessaging.setBadgeNumber();
|
||||
requestPermissions() {
|
||||
return FirebaseMessaging.requestPermissions();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set notification count badge number
|
||||
* @param n
|
||||
*/
|
||||
setBadgeNumber(n: number) {
|
||||
FirebaseMessaging.setBadgeNumber(n);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -194,7 +205,7 @@ export default class Messaging extends Base {
|
|||
* @param listener
|
||||
* @returns {*}
|
||||
*/
|
||||
onMessageReceived(listener: Function) {
|
||||
onMessage(listener: Function) {
|
||||
return DeviceEventEmitter.addListener(EVENT_TYPE.Notification, async(event) => {
|
||||
const data = Object.assign({}, event);
|
||||
|
||||
|
|
Loading…
Reference in New Issue