Re: [android-developers] about addaccountexplicitly

2011-12-13 Thread TreKing
On Wed, Dec 7, 2011 at 12:53 AM, Fanny Lau lauwaifanfa...@gmail.com wrote:

 finally the program has stopped every time(even the
 toast also no show)... what's wrong with my code


You're not debugging it. Try that.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] about addaccountexplicitly

2011-12-07 Thread Fanny Lau
i add the following code in my onCreate function and run the
program .. finally the program has stopped every time(even the
toast also no show)... what's wrong with my code


 AccountManager man = (AccountManager)
getSystemService(ACCOUNT_SERVICE);
Account account = new Account(my account string,
com.google);
if (man.addAccountExplicitly(account, my 
password, null)) {

Toast.makeText( 
getApplicationContext(), Account added
successfully., Toast.LENGTH_LONG).show();

}else {

Toast.makeText( 
getApplicationContext(), Account added
not successfully., Toast.LENGTH_LONG).show();

 }


in manifest.html

uses-permission android:name=android.permission.INTERNET/
uses-permission android:name=android.permission.GET_ACCOUNTS/
uses-permission android:name=android.permission.USE_CREDENTIALS/

uses-permission
android:name=android.permission.AUTHENTICATE_ACCOUNTS/

uses-permission android:name=android.permission.MANAGE_ACCOUNTS/

uses-permission android:name=android.permission.ACCOUNT_MANAGER/


help please

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en