mirror of
https://github.com/apache/cordova-android.git
synced 2025-04-28 05:50:26 +08:00
Change JS to call navigator.contacts instead of navigator.ContactManager, which no longer exists.
This commit is contained in:
parent
705b8f6874
commit
5cd25316fa
@ -256,14 +256,14 @@ public class ContactManager implements Plugin {
|
|||||||
|
|
||||||
// Code for backwards compatibility with the OLD Contacts API
|
// Code for backwards compatibility with the OLD Contacts API
|
||||||
if (all) {
|
if (all) {
|
||||||
this.ctx.sendJavascript("navigator.ContactManager.droidAddContact('" + name + "','" + phoneNumber + "','" + email +"');");
|
this.ctx.sendJavascript("navigator.contacts.droidFoundContact('" + name + "','" + phoneNumber + "','" + email +"');");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.ctx.sendJavascript("navigator.contacts.droidFoundContact('" + name + "','" + phoneNumber + "','" + email +"');");
|
this.ctx.sendJavascript("navigator.contacts.droidFoundContact('" + name + "','" + phoneNumber + "','" + email +"');");
|
||||||
}
|
}
|
||||||
} while (cur.moveToNext());
|
} while (cur.moveToNext());
|
||||||
if (all) {
|
if (all) {
|
||||||
this.ctx.sendJavascript("navigator.ContactManager.droidDone();");
|
this.ctx.sendJavascript("navigator.contacts.droidDone();");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.ctx.sendJavascript("navigator.contacts.droidDone();");
|
this.ctx.sendJavascript("navigator.contacts.droidDone();");
|
||||||
@ -272,7 +272,7 @@ public class ContactManager implements Plugin {
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (all) {
|
if (all) {
|
||||||
this.ctx.sendJavascript("navigator.ContactManager.fail();");
|
this.ctx.sendJavascript("navigator.contacts.fail('Error');");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.ctx.sendJavascript("navigator.contacts.fail('None found!');");
|
this.ctx.sendJavascript("navigator.contacts.fail('None found!');");
|
||||||
@ -299,7 +299,7 @@ public class ContactManager implements Plugin {
|
|||||||
if(data != null)
|
if(data != null)
|
||||||
{
|
{
|
||||||
data.email = email;
|
data.email = email;
|
||||||
this.ctx.sendJavascript("navigator.Contacts.droidFoundContact('" + data.name + "','" + data.phone + "','" + data.email +"');");
|
this.ctx.sendJavascript("navigator.contacts.droidFoundContact('" + data.name + "','" + data.phone + "','" + data.email +"');");
|
||||||
}
|
}
|
||||||
} while (cur.moveToNext());
|
} while (cur.moveToNext());
|
||||||
this.ctx.sendJavascript("navigator.contacts.droidDoneContacts();");
|
this.ctx.sendJavascript("navigator.contacts.droidDoneContacts();");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user