android - Get email account into textfield using cordova -


can please show me how email registered phone cordova application? in application, there registration page users must register emails , instead of them typing in, want use cordova current email on phone textfield of registration page named "email" , if possible firstname , lastname user used in registring email on phone textfield

so can use following plugin

[user-info-plugin][1] 

the way add use following command

cordova plugins add https://github.com/xarv/userinfo-cordova-plugin.git

after adding check config.xml proper entries.

usage:

var success = function(string){     alert(string);   };   var error = function(string){     alert("error");   };   getinfo("email",success,error,"email",[]);` 

the getinfo method 1 should use action "email". should done after cordova has been loaded i.e. inside ondeviceready after deviceready has been fired. document.addeventlistener('deviceready', ondeviceready, false);

also in manifest have add

    <uses-permission android:name="android.permission.get_accounts"/> 

as permission.

hope helps.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -