Android Code Snippet Google Play Game Services Installed?

In order to avoid the popup that says, "app won't run without Play Games service," I discovered a method for checking to see if it is installed. If not, you can skip your code relating to Play Games services.

B4X:
Dim pm As PackageManager
Dim installed =pm.GetInstalledPackages.IndexOf("com.google.android.play.games")>-1 As Boolean
   
If installed Then
' code to execute if installed
End If
 
Top