3

After USA and Google restrictions on Huawei devices my app warn multi times that :

App won't run without Google Play services, which are not supported by your device.

Application has some dependency about google apis but there is no serious problem and run correctly but this warning confuse our users .

My question is how to disable this warning ?

Alireza Nazari
  • 141
  • 1
  • 10

2 Answers2

1

After a lot of changes i can say that it's not possible to remove this dialog and it's cause of Gradle dependencies .

i removed all usages of GSM and just keep dependencies and it warn again and after removing GSM dependencies and replace it with Yandex Metrica it works perfectly .

Alireza Nazari
  • 141
  • 1
  • 10
0

Before invoking the GMS interface, invoke the following method to check whether the GMS is available:

public boolean isGMS(){
return GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(this) == com.google.android.gms.common.ConnectionResult.SUCCESS;
}

If true is returned, the GMS interface can be used properly.

If false is returned, the GMS interface cannot be used properly. Related processing is required:

As new Huawei phones are banned from using GMS, you app, if with GMS integrated, will be unable to run on new Huawei phones. If you want your app to run on these phones, integrate Huawei Mobile Services (HMS). The integration is quick and easy. You can conveniently convert your code using HMS Core ToolKit.

zhangxaochen
  • 32,744
  • 15
  • 77
  • 108