I have an Android React Native app which uses Firebase. It now requires in app messaging for which I have followed the instructions here.
When I send a test message from Firebase using the instance id for my Android emulator, I get the following when restarting the app:
2019-11-21 15:26:43.472 6075-6075/? I/FIAM.Headless: Starting InAppMessaging runtime with Instance ID xxxxx
2019-11-21 15:26:43.746 6075-6075/? I/FIAM.Headless: Setting display event listener
2019-11-21 15:26:43.752 6075-6075/? I/FIAM.Headless: went foreground
2019-11-21 15:26:43.759 6075-6110/? I/FIAM.Headless: Forcing fetch from service rather than cache. Test Device: true | App Fresh Install: true
2019-11-21 15:26:43.780 6075-6110/? W/FIAM.Headless: Recoverable exception while reading cache: /data/user/0/example.app/files/fiam_impressions_store_file: open failed: ENOENT (No such file or directory)
2019-11-21 15:26:43.795 6075-6110/? I/FIAM.Headless: Fetching campaigns from service.
2019-11-21 15:26:49.556 6075-6110/example.app I/FIAM.Headless: Successfully fetched 1 messages from backend
Judging by the last line, a message has been received. However nothing is displayed in the app on the emulator.
The only change I made was to use an older version of com.google.firebase:firebase-inappmessaging-display
and com.google.firebase:firebase-analytics
so that the gradle files synced correctly. My build.gradle
file:
implementation "com.google.android.gms:play-services-base:16.0.1"
implementation 'com.google.android.gms:play-services-maps:16.1.0'
implementation "com.google.firebase:firebase-core:16.0.6"
implementation "com.google.firebase:firebase-firestore:17.1.5"
implementation 'com.google.firebase:firebase-auth:16.1.0'
implementation "com.google.firebase:firebase-storage:16.1.0"
implementation "com.google.firebase:firebase-messaging:17.3.4"
implementation 'com.google.firebase:firebase-inappmessaging-display:17.0.5'
implementation 'com.google.firebase:firebase-analytics:16.0.6'
implementation('com.crashlytics.sdk.android:crashlytics:2.9.5@aar') {
transitive = true
}
implementation "com.google.android.gms:play-services-auth:16.0.1"
Is there something else I need to do in addition to the above instructions?