diff --git a/Examples/simple-fcm-client/android/app/src/main/java/fcm/com/google/firebase/quickstart/fcm/MainActivity.java b/Examples/simple-fcm-client/android/app/src/main/java/com/google/firebase/quickstart/fcm/MainActivity.java similarity index 100% rename from Examples/simple-fcm-client/android/app/src/main/java/fcm/com/google/firebase/quickstart/fcm/MainActivity.java rename to Examples/simple-fcm-client/android/app/src/main/java/com/google/firebase/quickstart/fcm/MainActivity.java diff --git a/Examples/simple-fcm-client/android/app/src/main/java/fcm/com/google/firebase/quickstart/fcm/MainApplication.java b/Examples/simple-fcm-client/android/app/src/main/java/com/google/firebase/quickstart/fcm/MainApplication.java similarity index 100% rename from Examples/simple-fcm-client/android/app/src/main/java/fcm/com/google/firebase/quickstart/fcm/MainApplication.java rename to Examples/simple-fcm-client/android/app/src/main/java/com/google/firebase/quickstart/fcm/MainApplication.java diff --git a/Examples/simple-fcm-client/app/App.js b/Examples/simple-fcm-client/app/App.js index 4f029180d6c2a7dc17f0bd057ba0a4525a1a5e7d..a7e5a7de8bec3785189e526f298f2927fab8b36a 100644 --- a/Examples/simple-fcm-client/app/App.js +++ b/Examples/simple-fcm-client/app/App.js @@ -33,7 +33,8 @@ export default class App extends Component { title: 'Hello', body: 'Test Notification', priority: "high", - show_in_foreground: true + show_in_foreground: true, + picture: 'https://firebase.google.com/_static/af7ae4b3fc/images/firebase/lockup.png' }); } diff --git a/Examples/simple-fcm-client/app/PushController.js b/Examples/simple-fcm-client/app/PushController.js index 28c7ac716c0551ab33840e0eddeee6fb9e211c19..404e517d8ffb81d80f80ed217df27474cac7d6b7 100644 --- a/Examples/simple-fcm-client/app/PushController.js +++ b/Examples/simple-fcm-client/app/PushController.js @@ -48,34 +48,23 @@ export default class PushController extends Component { notif.finish(WillPresentNotificationResult.All) //other types available: WillPresentNotificationResult.None break; } - } - this.showLocalNotification(notif); - }); - - this.refreshTokenListener = FCM.on(FCMEvent.RefreshToken, token => { - console.log("TOKEN (refreshUnsubscribe)", token); - this.props.onChangeToken(token); - }); + } - // direct channel related methods are ios only - // directly channel is truned off in iOS by default, this method enables it - FCM.enableDirectChannel(); - this.channelConnectionListener = FCM.on(FCMEvent.DirectChannelConnectionChanged, (data) => { - console.log('direct channel connected' + data); - }); - setTimeout(function() { - FCM.isDirectChannelEstablished().then(d => console.log(d)); - }, 1000); - } + this.refreshTokenListener = FCM.on(FCMEvent.RefreshToken, token => { + console.log("TOKEN (refreshUnsubscribe)", token); + this.props.onChangeToken(token); + }); - showLocalNotification(notif) { - FCM.presentLocalNotification({ - title: notif.title, - body: notif.body, - priority: "high", - click_action: notif.click_action, - show_in_foreground: true - }); + // direct channel related methods are ios only + // directly channel is truned off in iOS by default, this method enables it + FCM.enableDirectChannel(); + this.channelConnectionListener = FCM.on(FCMEvent.DirectChannelConnectionChanged, (data) => { + console.log('direct channel connected' + data); + }); + setTimeout(function() { + FCM.isDirectChannelEstablished().then(d => console.log(d)); + }, 1000); + }) } componentWillUnmount() {