Reputation: 812
I have a flutter application with Firebase Cloud Messaging (FCM) integration but I want to add my physical device or emulator as a test device to test the notifications on this device only without releasing to all production devices .. how can I achieve that ?
Upvotes: 4
Views: 2975
Reputation: 812
follow this steps :
1- add a debug print of the FCM token to your apps start by adding this line :
FirebaseMessaging.instance.getToken().then((value) => print(value));
2- run your app in debug mode and copy the token , it will look like this :
I/flutter ( 6513): Really_lage_token
3- login to your Firebase console and add a new notification :
4- click on send test message and add your token from step 2
5- click test and repeat for each test notification .
Upvotes: 2