Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use GCM on intel x86 Emulator

I'm using x86 Intel Android emulator for Android Apps develop.

but when I use google croud messaging API,error occured.

java.lang.UnsupportedOperationException: Device does not have package com.google.android.gsf

if switch emulator which using Google APis,error is clear.but very slowly....

I've searched same situation,and I found for Google maps API.

How to create avd with google api for Intel x86 atom image?

http://38911bytes.blogspot.de/2012/03/how-to-use-google-maps-api-in-android.html

but these article is only Google Maps Problem,not for GCM API.

is there solution?

like image 930
dmnlk Avatar asked Feb 15 '13 03:02

dmnlk


2 Answers

I would recommend you use AndroVM.

AndroVM
(source: androvm.org)

It's actually x86 Android VM images of VirtualBox (with Google APIs), where you can deploy & test your app efficiently. In my opinion, it's about as fast as real Android device, and makes me much productive while developing Android apps.

To set up AndroVM, you can check the official documentation here which I think it's quite clear.

And you can grab your VM images from download page, and don't forget to download the one with gapps & houdini.

I just checked my installation, and found GoogleServicesFramework.apk under /system/app. So it should meet your need.

like image 69
dlackty Avatar answered Oct 20 '22 17:10

dlackty


You can now use Genymotion, AndroVM has been deprecated.

You can launch the emulator from Eclipse with the plug-in and Android Studio I guess.

About the question I had this problem... follow the first answer (image with google apps) then create a google account and open Play Store so it can update because GCM need Google Play Services.

That's it.

like image 45
jamachad Avatar answered Oct 20 '22 17:10

jamachad