4

I am developing an Android app, which will use C2DM. In order to use C2DM a Gmail account must be logged in on the Android device.

I searched and found that if Android market app is installed then the Gmail account is always logged in - therefore we don't need to create a separate Gmail account and log in to that account to use C2DM.

So is the Android market app installed on all devices?

Graham Smith
  • 25,627
  • 10
  • 46
  • 69
waseemwk
  • 1,499
  • 3
  • 15
  • 44

1 Answers1

3

No Market must not be isntalled on all Apps but i think it is on more than 99% of all Phones. Some Custom ROMs like Cyanogen don't come with pre-installed Market. But if Market is installed that does not mean that the user also has a (active) GMail account.

Thommy
  • 5,070
  • 2
  • 28
  • 51
  • Thanks for reply. i have read somewhere that Each device has a default Gmail account associated with it. am i right or not – waseemwk Mar 07 '12 at 10:51
  • @WaseemKhan i think you're doing it wrong. [check this](http://developer.android.com/reference/android/accounts/AccountManager.html) – SkyWalker Mar 07 '12 at 10:56
  • No that is wrong, a device must not have a gmail account. But if you distribute your app over android market you can be sure that alomost everyone has a google account. – Thommy Mar 07 '12 at 11:23
  • i am not distributing it on Android market but i am creating it for some company and all employees of that company will be using this app. so i am not sure if all of them have gmail account or not. should i worry about Gmail account for each employee or not. should i assume that each member will have their Gmail account logged on Android ? – waseemwk Mar 07 '12 at 11:47
  • @Hardik i didn't mean that you are wrong, i meant that Waseem is wrong with his assumption that every devices has it's account. – Thommy Mar 07 '12 at 12:38
  • @Waseem you can check if there is a google account using the AccountManager Class: http://developer.android.com/reference/android/accounts/AccountManager.html – Thommy Mar 07 '12 at 12:39