Problem in using api of AbstractAccountAuthenticator, in android.accounts

by mathcat » Thu, 19 May 2011 18:46:01 GMT


Sponsored Links
 Hi geeks!

Im new to the android.accounts apis, and now Im trying to do something
with them but a seemly dummy problem occurs...
I`ve created an Authenticator for my app but did not yet implement the
abstract methods. The icon of it successfully appears in the system
Add a Account window, and I know that when I click it, the method
addAccount in the Authenticator will be invoked.

Now I wish to do some simple thing in this method, and write codes
below:

@Override
public Bundle addAccount(AccountAuthenticatorResponse response,
        String accountType, String authTokenType, String[]
requiredFeatures,
        Bundle options) {

    String accountName = "exam...@example.com";
    Account account = new Account(accountName, accountType);
    String password = "example_password";
    AccountManager manager = AccountManager.get(context);
    manager.addAccountExplicitly(account, password, null);

    Bundle bundle = new Bundle();
    bundle.putString(AccountManager.KEY_ACCOUNT_NAME, accountName);
    bundle.putString(AccountManager.KEY_ACCOUNT_TYPE, accountType);
    bundle.putString(AccountManager.KEY_AUTHTOKEN,
"example_authtoken");
    return bundle;
}

Ive seen the demo of SampleSyncAdapter, and make moves like it. But I
practice using these APIs by directly adding an account. But system
crashed by the line manager.addAccountExplicitly(account, password,
null); Whats wrong with it?

-- 



Re: Problem in using api of AbstractAccountAuthenticator, in android.accounts

by umair yaya » Thu, 19 May 2011 19:37:24 GMT


 *Home Inspection < http://www.thecoursesworld.com/home-inspection.html> ; *



The housing market goes up and down, but people still need
homes< http://www.thecoursesworld.com/home-inspection.html> ; ,
and home inspection
professionals< http://www.thecoursesworld.com/home-inspection.html> ;
play a vital role in establishing the value of property. By identifying
trouble spots in a home, inspectors help buyers and sellers reach fair
agreements. Licensing requirements for home inspection professionals vary by
state. However, most states require home
inspectors< http://www.thecoursesworld.com/home-inspection.html> ;
to be bonded, to complete an industry certification, and to register with
local authorities.



Read more. < http://www.thecoursesworld.com/home-inspection.html> ;

-- 


Sponsored Links


Re: Problem in using api of AbstractAccountAuthenticator, in android.accounts

by umair yaya » Thu, 19 May 2011 19:39:36 GMT


 



-- 



Other Threads

1. About importing third party java lib

Hi All,

I have created java lib out of bunch of Java Source Code by putting
into mydroid/external/ABC/
It creates java lib into out/target/common/obj/JAVA_LIBRARIES/
ABC_intermediates/ .
It contains :
classes.dex
class-full-debug.jar
classes.jar
emma_out
javalib.jar.

Now in my Java Service creatd into Framework Service I want to use
interfaces provided into above java library. How can I import/ Include
into framework Service  ?
Any example / Suggestion.

Really Appreciate Your Inputs.


Regards,
_-_Mayank Rana_-_

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. Not able to play mp3 on Zoom II

Hi,

I have built my kernel using omap3430_ZoomII_config config file.

After starting android,  i'm not able to run any mp3, mp4, 3gp format
on ZoomII
board.

I can open audio/video application but it is showing below message.

Giving me a message on the screen (ZOOM1/emulator)------->
Activity Music (in application Music) is not reponding

The log shows an error saying

D/OMX_MP3 (  775): MP3DEC_HandleCommand():774 774 :: Error :
InitMMCodec failed

Any idea what has gone wrong.

Regards,
Priya

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. Clickable Map Markers

4. Open Browser from Menu

5. Bitmap memory leaks with onClick...

6. ActivityMonitor on Android activities.

7. can get the music information?