Android Question Re: Check and install Google Play Services

Semen Matusovskiy

Well-Known Member
Licensed User
Hi, guys --

Because I use Google Map, I decided to check Erel's code in action.
To do this I took Android's emulator SDK 22 without Google Play Services.

Absolutelly unclear how to integrate correctly. isGooglePlayServicesAvailable finds that it's necessary to install. We run makeGooglePlayServicesAvailable.
But
1) how to detect that this funcion is finished and with which result ?
2) in my case makeGooglePlayServicesAvailable informed that my app will not run without Google Play Services. Surprise :) I expect that makeGooglePlayServicesAvailable will install Google API.

Any ideas ?

PS. It looks that to receive result of makeGooglePlayServicesAvailable is not one line of code.

https://developers.google.com/android/reference/com/google/android/gms/common/GoogleApiAvailability
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

Semen Matusovskiy

Well-Known Member
Licensed User
I call from Activity_Resume. But what activity should do after calling makeGooglePlayServicesAvailable ? To exit from Activity_Resume ? To sleep ?
I don't see the process of installation anyway. Alone what I see it's a message from makeGooglePlayServicesAvailable function - "Your app won't run without Google Play Services ..."
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I don't see the process of installation anyway. Alone what I see it's a message from makeGooglePlayServicesAvailable function - "Your app won't run without Google Play Services ..."
This is managed by Google Play Service SDK. I can only guess that it wasn't able to make the installation.

I call from Activity_Resume. But what activity should do after calling makeGooglePlayServicesAvailable ?
Show a message that a component is missing and you are trying to install it and don't do anything else.
 
Upvote 0

Semen Matusovskiy

Well-Known Member
Licensed User
Thanx, Erel -- I did exactly so :) But to use makeGooglePlayServicesAvailable sounds interesting. It's enough complex to find Google services in Play market. Too many applications with similar names. Meanwhile AliExpress is enough popular, so enough many persons have Chineese firmware without Google.
 
Upvote 0
Top