I am getting an error that google play services not installed in you device when I am trying to run my code on my android emulator. Although the code is woking fine on my physical android device.
You should use an emulator with google API like attached screenshot:
Those with (Google APIs) tag beside them have google play service installed.
Probably your device image does not come with Play Sotre services installed.
Create another device emulator with an image that the Play Sotre services are already installed. Those images will have a checked icon in Play Store column:
Use geny motion. Its much better than default emulators.
You can download one from here
Related
I am trying to download an app from virtual emulator using google play. Google play list all my real devices that I have used my email on and asks to download this app to one of them. I want to install it in the mobile emulator instead, is this even possible ?
Google play emulator download
Yes this is possible,
Open the AVD manager in android studio
create a virtual device
choose a device definition with the play store icon
Using this AVD you'll be able to login and access the play store. You can then install apps on this device via the browser too
If your emulator having the "PlayStore" then you can sign with your Gmail account, and can download the app likewise the real device,
I am new to android app development. I want to create an intent to launch Skype. In order to test this, I assume that the emulator must have Skype already installed.
I tried to launch the play store on the emulator to get the Skype App. But the Google Playstore, when launched on emulator it complains that there is no wifi or data connection.
How can I get the emulator to connect to the host wifi(Wifi which the laptop is connected to?)?
Is there a another way to get Skype app on emulator without playstore?
Thank you
Assuming that you're using the latest Android Studio and Emulator, you could get the Skype application APK file from other sites and drag it onto the emulator for it install the application.
However I do suggest as #CommonsWare stated, use a physical Android Device instead of an emulator as some (probably most) apps won't work correctly due to Google Play Services being missing. You could try the images in the Android SDK that contain part of the Google Play Services within them, it's worth a shot but not something to rely on for the long run.
I installed Play Store in my android emualtor. for some reasons I can't download many applications to my Emulator, because when it says "your device isn't compatible with this version" or just not appearing when I'm searching it.
Is there any way to "disguise" my emulator as Nexus 5 so that many application won't block me from downloading it?
I suggest you use the perfect Android emulator called: Genymotion: http://www.genymotion.com/, and then take look at http://www.youtube.com/watch?v=zvTYDcYOFyw to set up the Google play service on it. It works perfectly, and I can have different devices to emulate and download what I want.
I'm starting on emulator64-am, SDK's official emulator, and the Play Store is missing.
Does anyone knows if the Play Store was suposed to work in this emulator?
BTW, it's pretty slow on my mac book air with 4Mb memory.
Cheers
Gustavo
FYI, officially SDK's emulator don't contain Play Store app, but you can install it manually, there are many threads on web regarding how you can install it inside emulator.
Check: Google Play on Android 4.0 emulator
If you really want to have Google play installed in emulator then try Genymotion emulator.
When integrating a Google Plus login button in an Android app, I'm observing some differences in how the button appears on an actual device and in the emulator. I am aware of the fact that the Google Plus services APKs are not installed in the emulator, but this can be worked around by pulling the APKs from a device and installing them into the emulator using APK.
My current "implementation" simply includes the login button in a layout, by referring to the button with the following XML code:
<com.google.android.gms.common.SignInButton
android:id="#+id/sign_in_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
When I test my app on the device, the button appears all red and shiny, according to the guidelines mentioned here https://developers.google.com/+/mobile/android/sign-in . But when running on the emulator, it's just a normal button (grey background with black text) saying "Sign in with Google".
Any idea why the results are different? I've made sure I'm running the same API level, and the resource does seem to get pulled in correctly also on the emulator since it shows the actual login button (but with a different look).
Update: Found a clue in logcat; the message "Sign in button not found, using placeholder instead." pretty much explains why I'm seeing the grey dull button on the emulator. Still need to figure out why; could be the "copy google plus apk's from device" hack isn't working properly.
Google Play services works on the 4.2.2 versions of the Android Emulator and is officially supported as described in the Android documentation: Setup Google Play Services.
Update
You now can use the Intel/x86 images (HAXM-compatible) for API 19 and newer and for ARM, Google Play Services is available on most images.
Setting up the image
To get the right image for your virtual device manager:
Open the Android SDK Manager
Open the group Android 4.2.2 (API 17)
Check Google APIs
Check ARM EABI v7a System Image
To create the Virtual Device:
Open the Android Virtual Device Manager
Create a New device
Enter an AVD name
Set the target to Google APIs (Google Inc.) - API Level 17
Save your Virtual device and start it...
Note CPU/ABI will be fixed as ARM
Now you should be able to use the Google Play Services in the emulator. Of note, you need to set your target appropriately in your Android project to the Google APIs in order for Google Play Services to work.
I tried most combinations of running the emulator, but with and without the Google APIs, which means I tested with both x86 and arm modes. I found no way of making the apk's pulled from my Galaxy Nexus phone to run correctly on the emulator.
Guessing this is somewhat related to getting the Play Store up and running, I decided to try that as well to see if I had more luck. I did not; could not get that working either. The Play Store icons appear and can be launched, but it immediately closes itself.
What did work however was to download and install the apks at the bottom of the page here:
http://umut.tekguc.info/en/content/google-android-map-v2-step-step
After installing the vending and gms packages, the login button appeared in it's full beauty under the emulator. Since I haven't actually implemented the actual login functionality yet, I can not be sure that it will actually work, but at least the button now looks identical in my app on my device and in the emulator.
You also need to download the Google Play Services software (look under "Extras" in the Android SDK manager), and install the library google-play-services_lib in your project (File-Import-Android-Existing Android Code Into Workspace, and then browse to for instance /opt/adt-bundle-linux/sdk/extras/google/google_play_services/libproject and select google-play-services_lib).
Another interesting tidbit is that this will only work on the "pure" Android emulator setups, not with the "Google API" setups. It seems the latter have some parts of those apps installed in the emulator already (not visibly and not working), and I haven't managed to remove the existing versions to install the custom apk files that worked as described above. I tested adb remove, adb install, adb install -r, and even removing the directories from /data which also failed. It's looking very much like Google is trying to make this difficult.
I'm disappointed Google is making this so hard; Google may have some weird licensing reasons for keeping this stuff out of the emulator, but if they really want people to use their services in their Android apps they need to make these services available in the emulator. Forcing people to always develop on a device (with otherwise excellent emulators available) or making people jump through hoops (lots of googling, installing unofficial/hacked versions of the apks etc) is just evil.
Final update before accepting my answer; although the correct button with the correct styling is now showing in the emulator, I am still not able to get the "pick account" dialog to appear in the emulator. When/if I do I will share the proper solution here.
Check the ldpi, mdpi, hdpi, etc... folders for a different button graphic. Your emulator is almost certainly a different DPI than your device.
i have noticed that from API 21 there are ARM and x86 images with Google APIs implemented
perhaps if you have no problem emulating using android 5 it will works without extracting the APKs