SHARE
TWEET

Untitled

a guest Aug 20th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. export default class App extends React.Component {
  2.   async componentDidMount(){
  3.     // Bunu denedim işe yaramadı: PushNotification.cancelAllLocalNotifications();
  4.     PushNotification.configure({
  5.       onRegister: function(token) {
  6.         console.log("TOKEN:", token);
  7.       },
  8.    
  9.       onNotification: function(notification) {
  10.         console.log("NOTIFICATION:", notification);
  11.       },
  12.    
  13.       senderID: "YOUR GCM (OR FCM) SENDER ID",
  14.    
  15.       permissions: {
  16.         alert: true,
  17.         badge: true,
  18.         sound: true
  19.       },
  20.       popInitialNotification: true,
  21.    
  22.       requestPermissions: true
  23.     });
  24.  
  25.    
  26.     PushNotification.localNotificationSchedule({
  27.       id:212,
  28.       message: 'Deneme',
  29.       date: new Date(Date.now() + 1 * 1000),
  30.       repeatType: 'minute',
  31.     });
  32.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top