Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ionic 2 - How do use DeviceAccounts plugin #7

Open
rafaelcb21 opened this issue Dec 6, 2016 · 10 comments
Open

Ionic 2 - How do use DeviceAccounts plugin #7

rafaelcb21 opened this issue Dec 6, 2016 · 10 comments

Comments

@rafaelcb21
Copy link

How do I use DeviceAccounts in Ionic 2?

ionic plugin add https://github.com/loicknuchel/cordova-device-accounts.git

I'm trying to use the code below:

send(){
    (<any>window).plugins.DeviceAccounts.get(function(accounts){
        alert(accounts);
    }, function(error){
        alert(error);
    });
}

But this is giving the following error:

Cannot read property 'DeviceAccounts' of undefined

@nickbleyen
Copy link

Hi, I am trying to use this in Ionic 2 too now and I was wondering wether you've found a solution or not.

@janpio
Copy link

janpio commented Apr 24, 2017

There is a Ionic Native plugin for this Cordova plugin now that should solve your problems:
https://ionicframework.com/docs/native/device-accounts/

@loicknuchel
Copy link
Owner

This plugin is pointing at this repo...
I'm sorry guys but I can't maintain it anymore.
If anyone want to take care of it, we can discuss.

@janpio
Copy link

janpio commented Apr 24, 2017

Ionic Native makes normal Cordova plugins (like this one) work in Ionic 2, so no additional work for the Cordova plugin. As long as your repository exists, all is fine. If your code breaks in the future, someone can fork this project here, make changes and the Ionic Native plugin will adapt.

Thanks for creating this Cordova plugin!

@airstep
Copy link

airstep commented Jun 16, 2017

This plugin is not works for me... on ionic3

@janpio
Copy link

janpio commented Jun 16, 2017

Then open a topic at http://forum.ionicframework.com/

@airstep
Copy link

airstep commented Jun 16, 2017

It works for me after I fork it and fix

@danielsogl
Copy link

@airstep I allready fixed this problem last week: https://github.com/danielsogl/cordova-device-accounts

The problem is, that the ionic docs are out of date since weeks and they don't show the updated Cordova plugins.
I fixed many outdated plugins and upgraded them to newer maintained repositories.

@Neotrixsx
Copy link

@danielsogl I try your repo but not get any success.
The promise always returns undefined when i call the method DeviceAccounts.getEmails().
Please help me

I try to test in android 7.0 phone

@Juanpam
Copy link

Juanpam commented Apr 16, 2018

This does not work for me neither. Ionic 3 and android 7.0 phone. The promise never resolves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants