Guest User

Untitled

a guest
Nov 19th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. public class MessagingService extends FirebaseMessagingService {
  2.  
  3. public static String TAG = MessagingService.class.getSimpleName();
  4.  
  5. @Override
  6. public void onNewToken(String s) {
  7. super.onNewToken(s);
  8. Log.e(TAG,"NEW TOKEN IS: "+s);
  9. }
  10.  
  11. @Override
  12. public void onMessageReceived(RemoteMessage remoteMessage) {
  13. super.onMessageReceived(remoteMessage);
  14. Log.e(TAG,"NEW MESSAGE RECEIVED FROM SERVER!");
  15. }
  16. }
  17.  
  18. <application
  19. .....
  20.  
  21. <activity>
  22. ......
  23. </activity>
  24.  
  25. <meta-data
  26. android:name="com.google.android.geo.API_KEY"
  27. android:value="@string/google_maps_key" />
  28. <meta-data
  29. android:name="com.google.android.gms.version"
  30. android:value="@integer/google_play_services_version" />
  31.  
  32. <meta-data
  33. android:name="com.google.firebase.messaging.default_notification_channel_id"
  34. android:value="fcm_default_channel" />
  35.  
  36. <service android:name="ats.it.vn.furgodemo.util.notification.MessagingService">
  37. <intent-filter>
  38. <action android:name="com.google.firebase.MESSAGING_EVENT" />
  39. </intent-filter>
  40. </service>
  41.  
  42. </application>
Add Comment
Please, Sign In to add comment