I'm implementing Firebase In-App Messaging in my Android app, but campaigns sent from the Firebase console are not displaying. Here is the issue I'm encountering, as seen in
Logcat:
Forcing fetch from service rather than cache. Test Device: false | App Fresh Install: true
Recoverable exception while reading cache: /data/user/0/package_name/files/fiam_impressions_store_file: open failed: ENOENT (No such file or directory)
Fetching campaigns from service.
Service fetch error: PERMISSION_DENIED: Requests to this API firebaseinappmessaging.googleapis.com method google.internal.firebase.inappmessaging.v1.sdkserving.InAppMessagingSdkServing.FetchEligibleCampaigns are blocked.
Attempted Solutions:
Enabled the In-App Messaging API from the Firebase console.
Rebuilt the project multiple times.
Dependency:
implementation("com.google.firebase:firebase-inappmessaging-display:21.0.0")
implementation 'com.google.firebase:firebase-analytics:22.0.0'
How can I resolve the PERMISSION_DENIED error and get Firebase In-App Messaging campaigns to display in my app?
You have to add the firebase In-App Messaging permission to your Google Cloud API, you can add from the Google Cloud Console.
Try this Answer : Link