C2DM on Android 4.0 ICS Emulator

241 views
Skip to first unread message

peekay

unread,
Nov 11, 2011, 6:41:54 AM11/11/11
to android-c2dm
When registering ICS phone (emulated) with Google c2dm server I get
PHONE_REGISTRATION_ERROR. According to the doc it means "This phone
doesn't currently support C2DM.". Is C2DM supposed to work on ICS in
emulator at all? Is it a bug or feature, eventually when the support
will be added.
Thank you.
Peter

santiago velez saffon

unread,
Nov 11, 2011, 7:49:00 AM11/11/11
to androi...@googlegroups.com
Hello.
To use C2DM on an emulator(Eclipse) the target of the AVD have to be  Google-Apis.
On the emulator set the target of the AVD to Google-Apis-(the lvl).
Probably this 2 pages will help you.
 
 
2011/11/11 peekay <pete...@gmail.com>



--

Santiago Velez Saffon
____________________________

"To all the computer engineering profesionals,
past and present, whose work has made a difference to the life of mankind."(John Y.Hsu)

peekay

unread,
Nov 11, 2011, 9:16:17 AM11/11/11
to android-c2dm
Sure, I have Google Apis Level 14 in place
Target: Google APIs (Google Inc.)          Based on Android 4.0 (API
level 14)     ABI: armeabi-v7a    Skin: WVGA800  Sdcard: 256M
I can even add google account via settings from home screen when in
emulator. The same applied on Google API Level 8 works as described in
official c2dm docs. There is no reason for API8-based apps not work in
API14 unless API changed. If yes, then doc update would be
welcome.That "clickie" stuff you are pointing to is helpfull for new
projects. Looking into registration process it does not differ to doc-
described one. Anyway, I followed and installed wizzard-generated
sample app to the phone but the result is the same
"PHONE_REGISTRATION_ERROR" in logcat despite system requests me which
account to use for connection with c2dm. I will keep trying...Peter

On Nov 11, 1:49 pm, santiago velez saffon <svelezsaf...@gmail.com>
wrote:
> Hello.
> To use C2DM on an emulator(Eclipse) the target of the AVD have to be
> Google-Apis.
> On the emulator set the target of the AVD to Google-Apis-(the lvl).
> Probably this 2 pages will help you.
>
> http://code.google.com/eclipse/docs/appeng_android_create_project.html
>
> http://code.google.com/eclipse/docs/appeng_android_run_debug.html
>
> 2011/11/11 peekay <petek...@gmail.com>

flynny

unread,
Nov 21, 2011, 4:15:22 PM11/21/11
to android-c2dm
I also cant get this to work, with the same results and setup. Im also
runnning ICS on a real handset, and it still does not work. According
to C2DM docs, the phone is just supported. The exact same code works
on a gingerbread handset. Ive given up searching around, the Android
team needs to give us some information.

dtbaker

unread,
Dec 10, 2011, 1:30:25 AM12/10/11
to androi...@googlegroups.com
I could only get this working on Google API Level 8 in emulator, nothing "newer" in emulator worked.

Various sources say "to use c2dm in emulator use google api level 8 only". I guess c2dm in an emulator is only in 8. weird? 

Santosh M S

unread,
Feb 20, 2015, 10:54:28 AM2/20/15
to androi...@googlegroups.com
Addding this tag *inside* application tag, helped resolve the issue for me. 

   <application>
       .
       .
       .
        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />

    </application>
Reply all
Reply to author
Forward
0 new messages