App Inventor Extensions


Account Manager/Pick Google Account Extension

See the App Inventor Extensions document about how to use an App Inventor Extension.

For questions about this extension, bug reports and feature requests, please start a new thread in the App Inventor Extensions forum. Thank you.

AccountManager Extension

Oct 12th, 2015: Initial version

Aug 11th, 2016: Version 1a: avoid DX execution failed error: build each extension separately

Nov 18th, 2016: Version 2: AccountTypes, AccountNames, PickGoogleAccount methods added

Nov 28th, 2016: Version 2a: bugfix in case no Google account is available

Dec 5th, 2016: Version 3: removed the PickGoogleAccount method and created a new extension for that method

Dec 9th, 2016: Version 4: avatar added, name property now uses accountName parameter

Description

This extension provides some information from the account manager.
Required permission: android.permission.GET_ACCOUNTS, android.permission.READ_CONTACTS, android.permission.WRITE_EXTERNAL_STORAGE
Note: It is recommended to use the Pick Google Account extension instead, because that extension does not need any permissions.

Methods


Return the Email of the user's Google Account.
In case there is no Google account available, empty string is provided.


Return the Name of the given account name (email address).
The name will be extracted from the contacts of the device. In case there is no name available, empty string is provided.
Thank you Mika for being the sponsor of this block.


Return the Avatar of the given account name (email address).
The avatar image will be extracted from the contacts of the device. In case there is no avatar available, empty string is provided. Thank you Mika for being the sponsor of this block.


Return a list of all registered account types.


Return a list of account names of a given account type.

Account Manager Test




Pick Google Account Extension

Dec 5th, 2016: Initial version

Description

Extension to pick a Google Account.
This extension uses the Google Play library. Required permission: none
Note: This is the recommended method to get information about the user, because it does not need any permissions.

Methods


Provide an account picker to pick a Google account.
Note: This method is available starting from API Level 14 (Android 4).

Events


Event raised after account has been picked.

Pick Google Account Test

Do you need help with your App Inventor project?

I can help you: for one hour I charge 25 USD.
Please contact me at info [at] puravidaapps [dot] com for details!
For questions about App Inventor, please use the App Inventor forum. Thank you.

Terms and Conditions

Download


If you find this example helpful and you are using it in one of your projects,
be nice and donate a small amount!

Donation amount:

or donate some mBTC to Bitcoin Address:
1Jd8kXLHu2Vkuhi15TWHiQm4uE9AGPYxi8
Bitcoin

Thank you! Taifun
 

Download TaifunAM extension (aix file)
Download Account Manager Test project (aia file)

Download TaifunGoogleAccount extension (aix file)
Download Pick Google Account Test project (aia file)

Back to top of page ...

Creative Commons License
This work by Pura Vida Apps is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License
with attribution (name=Pura Vida Apps and link to the source site) required.


Home | Snippets | Tutorials | Extensions | News | Forums | Links | Search | Contact