Firebase cloud messaging targets are disabled - firebase

I need to send push messages, aka “cloud message”, via firebase console.
I have configured everything that the documentation and examples say (Users, User Properties, User Audiences, Events).
But when I try to compose a new notification, and select a target segment, they are disabled.
Attached is screenshot of target picker that should be enabled:

From Firebase support:
If the user properties and audiences are not showing up in the Notifications console, this could mean that your Data-sharing settings is turned off. Please turn this on, and you should start seeing the user properties and audiences in the Notifications console.

Related

How to disable reCaptcha in firebase phone-auth (OTP) android?

I've updated the firebase library recently and didn't change anything else.
implementation 'com.google.firebase:firebase-auth:20.0.1'
implementation 'com.google.firebase:firebase-messaging:21.0.0'
implementation 'com.google.firebase:firebase-storage:19.2.0'
implementation 'com.google.android.gms:play-services-auth:19.0.0'
but whenever a user tries to signup, a Recaptcha is showing for a few seconds and then sometimes redirects to a web browser (CustomChromeTab) after that OTP is received from firebase auth. It takes about 15-30 seconds. How to prevent the Recaptcha? However, I added the SHA1 and SHA256 in the firebase console and have not changed the code. Thanks.
Here is the screenshot of the captcha verification process:
Most of the times while implementing dependencies like:
implementation 'androidx.browser:browser:1.2.0'
the above window pops-up in the browser.
Here, is a way to resolve it successfully.
Step 1-
In the Google Cloud Console, enable the Android DeviceCheck API for your project. The default Firebase API Key will be used, and needs to be allowed to access the DeviceCheck API.
Step 2-
If you haven't yet specified your app's SHA-256 fingerprint, do so from the Settings Page of the Firebase console. Refer to Authenticating Your Client for details on how to get your app's SHA-256 fingerprint.
Hope it works!!!
For more information, you can also check Google SafetyNet API for checking Google Play Services installation in device at the time of Phone Authentication.
Also, need to perform additional steps:
Firebase Project Settings > App check > and Register firebase project in SafetyNet and Play Integrity register with default time token 1 hour.
Don't forget to go in Firebase Project Settings > App check > and Register firebase project in SafetyNet and Play Integrity register with default time token 1 hour and u will remove reCaptcha from phone auth OTP!
Try this alternative method to disable reCaptcha
mAuth = FirebaseAuth.getInstance();
// set this to remove reCaptcha web
mAuth.getFirebaseAuthSettings().setAppVerificationDisabledForTesting(true);
because I've been following Mohd Asim answer, and it doesn't work.
In order to remove the captcha verification, you have to do this in Google cloud console.
IMPORTANT (you may have done that, but for the reminder):
Add the SHA1 and SHA256 of your project (see how to get) in the firebase project setting page (See how to set).
Go to the Library page in the Google APIs Console.
In the search bar type "Android Device Verification", and select the Android Device Verification box (API). The Android Device Verification API dashboard screen appears.
If the API isn't already enabled, click Enable. Hope here your problem solves and if not then proceed further.
If the Create credentials button appears, click on it to generate an API key. Otherwise, click the All API credentials drop-down list, then select the API key that's associated with your project that has enabled the Android Device Verification API.
In the sidebar on the left, click Credentials. Copy the API key that appears.
Use this API key when you call the attest() method of the SafetyNetClient class.
For more information read this official page - https://developer.android.com/training/safetynet/attestation
go to google cloud console
Select project it should be same project in which firebase is running and make sure you have added sha-1 and sha-256 of both debug and release version and put updated google-services.json file in your app.
search android device verification
click on enable
5.done

How to disable all email notifications included "Urgent service advisories" from firebase console?

I need to disable all notifications from firebase console (also "Urgent service advisories"). In our project a lot of users, but they do not need alerts from Crashlytics.
I found only two notification settings:
1) Firebase alerts, that includes urgent notifications I need to disable!
2) Velocity alert settings. But there is just velocity, this setting also not disable all notifications.
Any suggestions how to disable all notifications for current users in project?
Thanks!
You could try making a custom role if you go to Settings>Users and permissions>Advanced permissions settings, and removing this role "cloudnotifications.activities.list". If that doesn't do it, you'll just have to make an email filter and blacklist the notifier manually.
If you click the notification bell in the Firebase Console, and go to settings, you can click into your Project, and disable Velocity Alerts from the Crashlytics section.
You can follow these steps
Click notification in firebase
Settings
Select your projects in Feature alerts box
You can uncheck any feature notification or email

How to create teams in firebase crashlytics after migration from fabric?

I have migrated from fabric to firebase by connecting apps via console but I am not getting crash report emails from firebase. I added different users from "Users and Permissions" as suggested here. But I am still not getting email notifications on crash. I tried creating custom role from google cloud console but I am not able to see that in my firebase console. Only case where I am getting mails is when I am adding new user as "Owner" which I think is not right because it would mean I should give full access to all team members. Has anyone faced such issue before?
P.S.: Crashes are logged in console but I am not getting email notifications on crash.
You can configure your email preferences from Alert Settings under the alert icon on the top left of the console. What does this window look like in your firebase console?
Next you need to have at least view permissions on the project to receive e-mail notification. Project owners and editors get email alerts by default. More information on this can be found here.

How Does Firebase Analytics Define Active User?

This question is for basic Firebase Analytics integration where a dependency is added and nothing else.
How does Firebase Analytics define Active User - does Firebase Analytics count active users as: foreground users as in users who actually opened the app OR background as well (for example if app has background process that runs daily without UI)?
An active user has engaged with an app in the device foreground, and has logged a user_engagement event.
The documentation is here:
https://support.google.com/firebase/answer/6317517#active-users

Permanent Notification From Firebase Cloud Function?

Is it possible to send permanent notification from firebase cloud functions? User can't dismiss that notification?
For iOS you cannot, but Android you could setup a local notification using remote config.
iOS Remote Notifications
While you could send the same notification over and over again, control of the notifications is at the OS level of the client device. iOS would never let you create a local or remote notification that cannot be dismissed because it would be a poor user experience. In addition, I think you would find that your users would not be happy about it as well.
An alternative, would be to create a custom UI Header in your app that includes a label. You could then use Firebase Remote Config to set a value for that label, that way you can deliver the same message to all users of your app.
Android Push Notifications
In Android, it looks like you can have permanent notifications. However, it looks like this is controlled at the client level. So I still recommend the remote config option here as well. Set the value of the remote config, and then generate a local notification and set the notification to not clear.
notification.flags |= Notification.FLAG_NO_CLEAR;
Perhaps, a key/value pair could be sent from your Firebase Cloud Message call, but you will run into other issues as well. When should the function be called? Will you generate a new notification for every new user added to Firebase? This could become more expensive versus the remote config route.
Google Chrome Notifications
The remote config option should scale to this as well. A quick Google search didn't show anything that would suggest you can do a permanent notification like Android. And even if you could then your solution wouldn't work in Safari and other browsers.

Resources