Safety net Api Error when downloaded from play store

107
October 16, 2019, at 1:20 PM

I have implemented a SafetyNet attest check when launching the app. It works fine when I run the release version from Android studio and detects (for eg.) the emulator from the device correctly. However when I download the same version from the Play store, it fires the failure listener every time, on a lot of legit devices.

It is a restricted API and works fine when run locally on those same devices.

If you check the image, the 33.75% error rate is when I have used this from the play store. Any idea what could be happening different with the same code when running in app downloaded from the Play store?

Answer 1

Found my issue!

For anyone using 'App signing by Google Play', make sure you add the SHA-1 provided by Google Play to the API restrictions in the API Console.

You should find this in 'App Signing' in the app on the Play Developer Console.

Rent Charter Buses Company
READ ALSO
How to pass Map<String, Any> as parameter using Retrofit2?

How to pass Map<String, Any> as parameter using Retrofit2?

I need to pass Map<String, Any> as parameter for PUT requestJson (made from Map) looks like this:

131
Sending data from ultrasonic sensor from Arduino to Android via Bluetooth

Sending data from ultrasonic sensor from Arduino to Android via Bluetooth

I am working with my diploma thesis and I have problem with communication Arduino -> Android using bluetoothThis is my app: Activity where I want to display distance to obstruction

113
Saving UIState of resource-heavy fragment

Saving UIState of resource-heavy fragment

I do know how to save data between config changes (using onSavedInstanceState and checking the Bundle in onCreate, for example, for not being null) and I also do know how to make data persistent (via SharedPreferences), but here I need an in-between-solution

112
Get View and ViewModel to communicate using a common Protocol

Get View and ViewModel to communicate using a common Protocol

I'm trying to tell the View that it needs to navigate to ether one of the two destinations using the LiveData:

114