adding googles json

This commit is contained in:
Adolfo Reyna
2022-12-10 20:11:21 -05:00
parent d676ba06c6
commit a951dec46e
2 changed files with 47 additions and 9 deletions

17
App.js
View File

@@ -40,15 +40,6 @@ Notifications.setNotificationHandler({
});
async function registerForPushNotificationsAsync() {
if (Platform.OS === 'android') {
Notifications.setNotificationChannelAsync('default', {
name: 'default',
importance: Notifications.AndroidImportance.MAX,
vibrationPattern: [0, 250, 250, 250],
lightColor: '#FF231F7C',
});
}
let token;
if (Device.isDevice) {
const { status: existingStatus } = await Notifications.getPermissionsAsync();
@@ -67,6 +58,14 @@ async function registerForPushNotificationsAsync() {
alert('Must use physical device for Push Notifications');
}
if (Platform.OS === 'android') {
Notifications.setNotificationChannelAsync('default', {
name: 'default',
importance: Notifications.AndroidImportance.MAX,
vibrationPattern: [0, 250, 250, 250],
lightColor: '#FF231F7C',
});
}
console.log(token);
return token;