Pick an email using AccountPicker.newChooseAccountIntent

后端 未结 3 673
渐次进展
渐次进展 2020-12-04 20:30

I\'m trying to let the user pick an Email account using the following code:

Intent intent = AccountPicker.newChooseAccountIntent(null, null, new String[]{\"c         


        
3条回答
  •  我在风中等你
    2020-12-04 20:37

    It's 2019, and the code does not seem to work anymore. To get all accounts shown in the picker (using Xamarin Android), instead of

    Android.Gms.Common.AccountPicker.NewChooseAccountIntent(null, null, 
    null, false, null, null, null, null);
    

    you have to use

    Android.Accounts.AccountManager.NewChooseAccountIntent(null,null,null,null,null,null,null)
    

提交回复
热议问题