Add implementation 'com.google.android.gms:play-services-safetynet:15.0.1'
to dependencies of /android/app/build.gradle
Add the following code to /android/app/src/main/java/com/PROJECT_NAME/MainApplication.java
import android.content.Intent;
import com.google.android.gms.common.GooglePlayServicesUtil;
import com.google.android.gms.security.ProviderInstaller;
import com.google.android.gms.security.ProviderInstaller.ProviderInstallListener;
public class MainApplication extends Application implements ReactApplication {
...
@Override
public void onCreate() {
super.onCreate();
upgradeSecurityProvider(); //add this
SoLoader.init(this, /* native exopackage */ false);
}
private void upgradeSecurityProvider() {
ProviderInstaller.installIfNeededAsync(this, new ProviderInstallListener() {
@Override
public void onProviderInstalled() {
}
@Override
public void onProviderInstallFailed(int errorCode, Intent recoveryIntent) {
GooglePlayServicesUtil.showErrorNotification(errorCode, MainApplication.this);
}
});
}
}
Also works on RN 0.59.4.