3

If I want to use GCM in a development environment, can I use the Android mobile device emulator or do I need a physical device?

I want to run the GCM Demo Application.

Rob Hruska
  • 118,520
  • 32
  • 167
  • 192
dmotta
  • 1,843
  • 2
  • 21
  • 32

2 Answers2

3

You can use an emulator. But it has to be version 2.2 above and contains Google API. Once you created this emulator AVD, goto Settings->Accounts & Sync, then add a google account. Once this is done, you should be ready to register for GCM and receive messages from it.

azgolfer
  • 15,087
  • 4
  • 49
  • 46
1

Don't believe everything you read in the documentation. Some of it is completely wrong.

For instance, I have a freshly created 2.2 emulator which won't register to GCM; it returns PHONE_REGISTRATION_ERROR every time. Later emulators work fine.

Michael Hampton
  • 9,737
  • 4
  • 55
  • 96