Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MessagingService extends FirebaseMessagingService {
- public static String TAG = MessagingService.class.getSimpleName();
- @Override
- public void onNewToken(String s) {
- super.onNewToken(s);
- Log.e(TAG,"NEW TOKEN IS: "+s);
- }
- @Override
- public void onMessageReceived(RemoteMessage remoteMessage) {
- super.onMessageReceived(remoteMessage);
- Log.e(TAG,"NEW MESSAGE RECEIVED FROM SERVER!");
- }
- }
- <application
- .....
- <activity>
- ......
- </activity>
- <meta-data
- android:name="com.google.android.geo.API_KEY"
- android:value="@string/google_maps_key" />
- <meta-data
- android:name="com.google.android.gms.version"
- android:value="@integer/google_play_services_version" />
- <meta-data
- android:name="com.google.firebase.messaging.default_notification_channel_id"
- android:value="fcm_default_channel" />
- <service android:name="ats.it.vn.furgodemo.util.notification.MessagingService">
- <intent-filter>
- <action android:name="com.google.firebase.MESSAGING_EVENT" />
- </intent-filter>
- </service>
- </application>
Add Comment
Please, Sign In to add comment