Android Question Problem in Googlemap service

Pooya1

Active Member
Licensed User
Hi
I use Googlemap v2 in my app and it is working well
My manifest code for googlemap is :
B4X:
'************ Google Play Services Base ************
AddApplicationText(
   <activity android:name="com.google.android.gms.common.api.GoogleApiActivity"
  android:theme="@android:style/Theme.Translucent.NoTitleBar"
  android:exported="false"/>
    <meta-data
  android:name="com.google.android.gms.version"
  android:value="@integer/google_play_services_version" />
)
'************ Google Play Services Base (end) ************
My problem is when check googleplayservice,it is false,while googleplayservice is install on my device
Android version is 7 and device is samsung
In other device have no problem
I'm following below link for use googlemap
https://www.b4x.com/android/forum/threads/google-maps.63930/#content
 

Pooya1

Active Member
Licensed User
How do you check it?

What happens when you run the program?
I use below code
B4X:
Sub CheckForGooglePlayServices As Boolean
   Dim GoogleApiAvailablity As JavaObject
   GoogleApiAvailablity = GoogleApiAvailablity.InitializeStatic("com.google.android.gms.common.GoogleApiAvailability").RunMethod("getInstance", Null)
   Dim context As JavaObject
   context.InitializeContext
   If GoogleApiAvailablity.RunMethod("isGooglePlayServicesAvailable", Array(context)) <> 0 Then
     GoogleApiAvailablity.RunMethod("makeGooglePlayServicesAvailable", Array(context))
     Return False
   End If
   Return True
End Sub
This function return True and when i go to Google Store,Googleplayservice is installed
I cannot see googlemap in app and force close app
 
Upvote 0
Top