Android Question how to use google REST APIs?

zolive33

Active Member
Licensed User
Longtime User
Hi,

I would like to add the externals libraries "Google Api Client library" and "Android extension" to my project. But I can't find them with the SDK Manager?

I try to declare :
B4X:
#AdditionalJar: com.google.android.gms:play-services-auth
#AdditionalJar: com.google.api-client:google-api-client
#AdditionalJar: com.google.api-client:google-api-client-android

but the compiler returns an error :
Maven artifact not found. com.google.api-client/google-api-client

Could you help me? Thanks a lot
 

zolive33

Active Member
Licensed User
Longtime User
I tried to add the jar file, like this:
B4X:
#AdditionalJar: C:\users\olivier\Mes documents\01-projets\02-Android\ZeBudget.dev\Android\libs\google-api-client-android-1.30.4.jar

But, at runtime, I get this error :
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/api/client/googleapis/extensions/android/gms/auth/GoogleAccountCredential;
 
Last edited:
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Google Api Client library"
you´ll NOT get it working.

Which Api do you want to implement exactly?

Use B4A Code to use any of the Google REST Apis.
Example:

You´ll also need to use OAuth2
 
Last edited:
Upvote 0

zolive33

Active Member
Licensed User
Longtime User
Use B4A Code to use any of the Google REST Apis.

Hi DonManfred,

Thank you for your answers. I will Use B4A Code solutions.
I was hoping to use a library created with Android Studio to access Google Drive.

what kind of lib should this be? Sounds like a plugin for Android Studio? If so then it will not help. B4X does not use any AS plugins.

the Android Extension is the library "google-api-client-android".
https://developers.google.com/android/guides/http-auth
https://developers.google.com/api-client-library/java/google-api-java-client/setup

Best regards.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…