In flutter I'm using Firebase In-app messaging. It says that to test my campaigns on my device I can provide a Firebase Instance ID:
Documentation says
Find your testing app's Instance ID by checking the Logcat in Android Studio for the following
Info
level log: I/FIAM.Headless: Starting InAppMessaging runtime with Instance ID YOUR_APP_ID
But I'm using Visual Code Studio to run my Flutter code. In "Debug Console" tab I do have some messages related to FIAM.Headless but nothing about "Starting InAppMessaging runtime with Instance ID YOUR_APP_ID"
How can I get the Firebase Instance IDs in Flutter?
The Flutter extension for VS Code doesn't include anything for displaying raw logcat
output like Android Studio but you can run adb logcat
in the built-in Terminal to get the same output that you would in Android Studio.
Though as mentioned above, you could print the token yourself without needing to parse through the full output, something like:
firebaseMessaging.getToken().then(print);
Hi, adb logcat did the trick thanks :) Firebase instance Id and FCM are 2 differents things though: adb logcat gave me something like eF1vOdp*** while my FCM token (which I retrieved with firebaseMessaging.getToken()) is eF1vOd***:APA91bELs7rLF7KIxw_q4Dkh26aqEzUF0_-NbNlR0wGU1csY2UhLolEjrSWzm0RCH2Uwn3kYzk4jObnuFA0zZvVL0jveFpTKnJDsyNT6T8ssjY9sB8BhvUEKYq352aIU2HwUsKgsGRUG, so actually the instance Id is the 10 first characters of the FCM, so yeah technically i could have use getToken() :)
Aha, I wasn't entirely familiar with the library. Glad you got what you need! :-)