Android How to add / configure Exchange with software?

Is it me or I can’t find any example of how to add / configure Microsoft Exchange programmatically?

It seems

AccountManager ::

addAccount (String accountType, String authTokenType, String[] requiredFeatures, Bundle addAccountOptions, Activity activity, AccountManagerCallback<Bundle> callback, Handler handler)

must do the job. However, I cannot figure out how for a Microsoft Exchange account. Could you tell me a simple working code example?

Thank.

+3
source share
2 answers

It seems that the applications cannot be executed.

you will get the following exception:

ERROR/AndroidRuntime(442): Caused by: java.lang.SecurityException: caller uid xxxxx is different than the authenticator uid

, , , (Google), , . , AccountManager .

+3

Android AccountManager , , . , UID, Exchange, .. , URI .

0

Source: https://habr.com/ru/post/1772200/


All Articles