tags:

views:

145

answers:

1

I can get the device (owner's)phone via

TelephonyManager tm = 
          (TelephonyManager)ctx.getSystemService(ctx.TELEPHONY_SERVICE);
phone = tm.getLine1Number();

But i am not sure how to determine the gmail or other account belonging to this user(device)

How do you do that?

A: 

You'll want to use AccountManager (available in Eclair and higher) to access this information. You can find an example of how to use this interface in the ContactManager sample application bundled with the SDK.

Roman Nurik
That example does not tell you who the device owner is or does it?
qiktalk