how to implement fcm in andorid project
<!-- for get access token -->
Note:- dont forgot to add json file which is download by Firebase console
Full demo here:- https://drive.google.com/open?id=0B7De_mE7QNdOZUFjNFo2dW5tTEk
<!-- for get access token -->
refreshedToken = FirebaseInstanceId.getInstance().getToken();
<!--register sevice in manifest-->
<!--FCM service registration--><service android:name=".pushnotification.MyFirebaseMessagingService"> <intent-filter> <action android:name="com.google.firebase.MESSAGING_EVENT" /> </intent-filter> </service> <service android:name=".pushnotification.MyFirebaseInstanceIDService"> <intent-filter> <action android:name="com.google.firebase.INSTANCE_ID_EVENT" /> </intent-filter> </service>
<!-- app build.gradle -->
apply plugin: 'com.google.gms.google-services'<!-- project build.gradle -->classpath 'com.google.gms:google-services:3.0.0'
Note:- dont forgot to add json file which is download by Firebase console
Full demo here:- https://drive.google.com/open?id=0B7De_mE7QNdOZUFjNFo2dW5tTEk
No comments:
Post a Comment