I am trying to run a callable cloud function on the emulator but I'm failing because the app check is not successful
Here's the launcher activity of my app. The activity calling the function is different.
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash_screen);
Objects.requireNonNull(getSupportActionBar()).hide();
FirebaseApp.initializeApp(this);
FirebaseAppCheck firebaseAppCheck = FirebaseAppCheck.getInstance();
firebaseAppCheck.installAppCheckProviderFactory(SafetyNetAppCheckProviderFactory.getInstance());
The error I'm getting is:
W/FirebaseContextProvider: Error getting App Check token; using placeholder token instead.
Error: com.google.firebase.FirebaseException: Error returned from API. code: 403 body: App attestation failed: 1:<number>:android<number>:
I don't get how I should be initialising App Check instead.