Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
title: "From push",
subtitle: "Subtitle",
body: "Body",
badge: 1,
payload: {
key1: "value1",
key2: "value2"
},
category: "com.example.category",
"content-available": 0,
"action-identifier": "default"
};
device.sendUserNotification(userNotificationCalendarTrigger);
device.sendUserNotification(userNotificationLocationTrigger);
device.sendUserNotification(userNotificationTimeIntervalTrigger);
device.sendUserNotification(userNotificationPushTrigger);
// $ExpectError
device.setOrientation("normal");
device.setOrientation("portrait");
// $ExpectError
device.setLocation();
device.setLocation(32.04, 34.78);
device.setURLBlacklist(["https://flow.org", "https://flow.org"]);
device.enableSynchronization();
device.disableSynchronization();
device.resetContentAndSettings();
device.getPlatform();
// Matchers
},
title: "From push",
subtitle: "Subtitle",
body: "Body",
badge: 1,
payload: {
key1: "value1",
key2: "value2"
},
category: "com.example.category",
"content-available": 0,
"action-identifier": "default"
};
device.sendUserNotification(userNotificationCalendarTrigger);
device.sendUserNotification(userNotificationLocationTrigger);
device.sendUserNotification(userNotificationTimeIntervalTrigger);
device.sendUserNotification(userNotificationPushTrigger);
// $ExpectError
device.setOrientation("normal");
device.setOrientation("portrait");
// $ExpectError
device.setLocation();
device.setLocation(32.04, 34.78);
device.setURLBlacklist(["https://flow.org", "https://flow.org"]);
device.enableSynchronization();
device.disableSynchronization();
device.resetContentAndSettings();
device.getPlatform();
type: "push"
},
title: "From push",
subtitle: "Subtitle",
body: "Body",
badge: 1,
payload: {
key1: "value1",
key2: "value2"
},
category: "com.example.category",
"content-available": 0,
"action-identifier": "default"
};
device.sendUserNotification(userNotificationCalendarTrigger);
device.sendUserNotification(userNotificationLocationTrigger);
device.sendUserNotification(userNotificationTimeIntervalTrigger);
device.sendUserNotification(userNotificationPushTrigger);
// $ExpectError
device.setOrientation("normal");
device.setOrientation("portrait");
// $ExpectError
device.setLocation();
device.setLocation(32.04, 34.78);
device.setURLBlacklist(["https://flow.org", "https://flow.org"]);
device.enableSynchronization();
device.disableSynchronization();
device.resetContentAndSettings();
device.getPlatform();
device.launchApp({ permissions: false, url: false });
// $ExpectError
device.terminateApp({ err: "err" });
device.terminateApp();
device.terminateApp("other.bundle.id");
device.reloadReactNative();
device.sendToHome();
device.installApp();
device.uninstallApp();
// $ExpectError
device.openURL({ url: "https://flow.org", sourceApp: false });
device.openURL({ url: "https://flow.org" });
// $ExpectError
device.sendUserNotification();
const userNotificationCalendarTrigger = {
trigger: {
type: "calendar",
"date-components": {
era: 1,
year: 2017,
month: 1,
day: 1,
hour: 0,
minute: 0,
second: 0,
weekday: 0,
weekdayOrdinal: 0,
quarter: 1,
weekOfMonth: 1,
weekOfYear: 1,
trigger: {
type: "push"
},
title: "From push",
subtitle: "Subtitle",
body: "Body",
badge: 1,
payload: {
key1: "value1",
key2: "value2"
},
category: "com.example.category",
"content-available": 0,
"action-identifier": "default"
};
device.sendUserNotification(userNotificationCalendarTrigger);
device.sendUserNotification(userNotificationLocationTrigger);
device.sendUserNotification(userNotificationTimeIntervalTrigger);
device.sendUserNotification(userNotificationPushTrigger);
// $ExpectError
device.setOrientation("normal");
device.setOrientation("portrait");
// $ExpectError
device.setLocation();
device.setLocation(32.04, 34.78);
device.setURLBlacklist(["https://flow.org", "https://flow.org"]);
device.enableSynchronization();
device.disableSynchronization();
device.resetContentAndSettings();