Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export default class App extends React.Component {
- async componentDidMount(){
- // Bunu denedim işe yaramadı: PushNotification.cancelAllLocalNotifications();
- PushNotification.configure({
- onRegister: function(token) {
- console.log("TOKEN:", token);
- },
- onNotification: function(notification) {
- console.log("NOTIFICATION:", notification);
- },
- senderID: "YOUR GCM (OR FCM) SENDER ID",
- permissions: {
- alert: true,
- badge: true,
- sound: true
- },
- popInitialNotification: true,
- requestPermissions: true
- });
- PushNotification.localNotificationSchedule({
- id:212,
- message: 'Deneme',
- date: new Date(Date.now() + 1 * 1000),
- repeatType: 'minute',
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement