Wednesday, June 9, 2010

[android-developers] Re: Force Close when running AccountManager.get(this).getAccounts()

Yes you DO need to add
<uses-permission
android:name="android.permission.GET_ACCOUNTS" />
in your manifest.
otherwise your application will die with an exception that you can
track in the DDMS perspective of Eclipse

Cheers

On 9 juin, 08:14, Jean <owenryan...@gmail.com> wrote:
> Hi all,
>
>     I tried to retrieve user's gmail address on Android phone using
> AccountManager.get(this).getAccounts(), but got force close when
> running the code in emulator (platform 2.2, API level 8) and Motorola
> Droid handset...
>     Do I need any user-permission in manifest file? what else I might
> be missing?
>
> Thanks much!
> Jean

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment