Show Admob banner in android 2.1 using google play services library - android

I am stuck in a strange problem. I a creating an app which has something to do with google plus only when its running on android 2.3 or above. So I use Google Play Services Library for the purpose. The library runs on 2.3 and above.
Now even if I wish to do google plus stuff on 2.3 and above, I want my app to be capable of showing ads from android 2.1 . But this is not sort of possible because admob is now integrated in Google Play Services Library which does not support 2.1 . I cannot even include a separate Jar for admob because using both admob jar and play services library simultaneously gives multiple dex file error at compile time.
Is there any real solution to the problem ? Thanks

Related

Android Emulator stuck on "Google Play Services are Updating"

I recently began learning how to create Google Maps activities in Android app development, and have stumbled onto an issue with Google Play Services. Whenever I set my gradle build dependency to compile 'com.google.android.gms:play-services-maps:11.0.4', which is the most recent version of play-services-maps, the emulator screen gets stuck on the following view upon running my maps app:
I have allowed the app to sit there for over an hour, and nothing has changed or updated. As I've read in other StackOverflow questions, I can get the app to properly function by setting my gradle build dependency to an older version, such as compile 'com.google.android.gms:play-services-maps:9.0.0', but this limits my ability to use newer Android features and APIs in my apps, such as FusedLocationProviderClient.
I am running on Nougat 7.1.1, and have installed the following SDKs in an attempt to solve this Google Play Updating issue:
Android SDK Build-Tools
Android SDK Tools
Google Play APK Expansion Library
Google Play services
Support Repository > Google Repository
I haven't found any StackOverflow threads specific to this "Google Play services are updating" message. What can I do to resolve this issue?
Use API 24 or API 26 Android Emulator system images and you should be good to go. API 25 does not have the latest Google Play Store app pre-installed yet. Note on the screen shot that only these images are "Google Play" versions.
In addition to #Jamal Eason's answer, you may use Nexus 5 and Nexus 5X emulators which have Play Store. Check here. You may also try running on real android device connected via USB that supports google maps and having google play service installed.

Google Play Services running on Emulator

Adding Google Play Services lib (v.7327000) to my app, it works well on real devices but Activity crashes and I get error on running emulator (Google API 21/22, tried Nexus4/5/10) like this:
"E/OpenGLRenderer(2560): Could not allocate texture for layer (fbo=1 2560x1326)"
Tried with Android Studio (selective lib) and Eclipse (library project).
Does anyone know a solution ?

Is it possible to use google-play-services 7.0 with eclipse?

Latest changes to Google Play Services for Android results in > 65k methods problem in Eclipse. It is possible to include parts of Google Play Services but in Android Studio Only. What about Eclipse? I saw and tried to use some split scripts that split google-play-services.jar but this is not official Google recomendation.
Do they want us to finally migrate to Android Studio?

google play services libraries - android dev : reducing the library size?

I'm developing an android app with the google games services. I've already integrate the games services API to my app, and it's working fine.
My issue is that the full library of google games services gives a huge size (more than 5 Mo) to the installed app on my terminal, and it's very inconvenient...
I'm developing for android 2.3 with android 4.4.2 platform with the Support libraries v4 and google play services libraries. In the code, I'm only using games achievements part of google play services. I've created a BaseGameActivity which access to all functions I need to unlock reveal or display achievements. I had many problems to integrate BaseGameActivity to my project as a library so I include the 4 .class files "BaseGameActivity", "BaseGameUtils", "GameHelper" and GameHelperUtils". I know it isn't the good way but it works.
I would reduce the size of the google play services libraries, deleting part that I'm not using in my app but I don't know what .class I'm using with the achievements.
Have you some idea ?
thank you
this might be of help to you if you're using gradle for building the app:
https://gist.github.com/dmarcato/d7c91b94214acd936e42
I am not sure which classes are unnecessary for achievements but you can start by stripping all and then you'll find out what is missing when trying to build since it will throw an exceptions for missing code.

Google Play Service library in Android

Hello I am trying to use google-play-services_lib in my android project. As you know in android phone there is Google Play Service APK which provide a some features to you such as location fetching etc.
So I have confusion that Suppose user have Google Play Service APK version is 4.3 and I am using Google Play Services library version is 4.0.30 in android project to build the app.
Do we require same version on both side like build with same latest Google play service library and Google Play Services installed APK to make as like Push Notification, Location fetching work in this case or there is no link between them ?
Thanks in advance
They don't have to match.
The development of the library and the application is not completely dependant, that's why thier version number is different. As far as I know, each release of the services apk defines a maximum version of the library that is supported. So the only conflict could happen when the services apk is outdated (on the target device), and your application's library is a newer one.
The best you can do is to update the library, and the services application on your device.
It should work that way.
I dont think so that there is link between APK and supported libraries in that because the APK silently gets updated about libraries

Categories

Resources