Skip to content

cordova.plugins.email.hasAccount always returns false on Android 10 #350

@regnete

Description

@regnete

cordova.plugins.email.hasAccount alsways returns false on Android 10 even if on or more accounts are configured on the device.
I tracked it down to a permission issue (see https://stackoverflow.com/a/54941079/4094951) and will shortly provide a pull request containing a fix.

Details:
For Android 10 to have to declare the additional permisson READ_CONTACTS in AndroidManifest.xml and you also have to request that permission on runtime. Otherwise AccountManager.get(ctx).getAccounts() will always return an empty array.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions