push - Handling the C2DM error ACCOUNT_MISSING in Android -
push - Handling the C2DM error ACCOUNT_MISSING in Android -
the registration c2dm may result in error account_missing. error must handled, according documentation, in way "the application should inquire user open business relationship manager , add together google account."
i offer user possibility application. have seen 2 ways show screen:
//intent context.startactivity(newintent(settings.action_add_account).putextra(settings.extra_authorities, new string[] {?}));
the problem solution have tried several extra_authorities ("com.google", "com.google.android.gsf, etc) , none of them show , if parameter extra_authorities omitted phone business relationship shown.
//account manager accountmanager.get(context).addaccount("com.google", null, null, null, this, new accountmanagercallback<bundle>() { public void run(accountmanagerfuture<bundle> accountmanagerhandle) { //todo handle response. } }, null); }
the problem solution requires permission manage_accounts, , users not take permission that.
how deal situation?
for extra_authorities field can utilize "gmail-ls" show google business relationship selector.
after much googling found constant in android.provider.gmail source code:
public static final string authorization = "gmail-ls"
this class not part of public api workaround it's bit fragile :-(.
android push android-c2dm account-management google-account
Comments
Post a Comment