Warm tip: This article is reproduced from stackoverflow.com, please click
android flutter visual-studio-code firebase-in-app-messaging

How can I get the FirebaseInstanceId using VSCode?

发布于 2020-03-27 10:27:18

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:

enter image description here

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?

Questioner
woshitom
Viewed
109
Danny Tuppeny 2019-07-04 14:23

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);