How do you get the Android's primary e-mail address(play store mail id) RRS feed

  • Question

  • User252545 posted

    i am developing an application in which i need user's mail id to be fetch from his mobile device and display it in edittext but i don't have any idea how can we do it. as i am new in xamarin.android so can anyone suggest me the best possible and easy way to do this.

    Thursday, September 22, 2016 6:00 AM

All replies

  • User92365 posted

    you have the chance that the teacher is on late

    ` Android.Accounts.AccountManager account = Android.Accounts.AccountManager.Get(ctx) ; Android.Accounts.Account[] tabAccount = account.GetAccountsByType("com.google");

            List<Android.Accounts.Account> list = new List<Android.Accounts.Account>();
            foreach (Android.Accounts.Account act in tabAccount)
                string name = act.Name;


    hope this help

    Thursday, September 22, 2016 7:15 AM
  • User252545 posted

    thank you but it is already solved.

    Tuesday, September 27, 2016 5:26 AM