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