Change JS to call navigator.contacts instead of navigator.ContactManager, which no longer exists.

This commit is contained in:
Bryce Curtis 2010-09-15 14:38:57 -05:00
parent 705b8f6874
commit 5cd25316fa

View File

@ -256,14 +256,14 @@ public class ContactManager implements Plugin {
// Code for backwards compatibility with the OLD Contacts API
if (all) {
this.ctx.sendJavascript("navigator.ContactManager.droidAddContact('" + name + "','" + phoneNumber + "','" + email +"');");
this.ctx.sendJavascript("navigator.contacts.droidFoundContact('" + name + "','" + phoneNumber + "','" + email +"');");
}
else {
this.ctx.sendJavascript("navigator.contacts.droidFoundContact('" + name + "','" + phoneNumber + "','" + email +"');");
}
} while (cur.moveToNext());
if (all) {
this.ctx.sendJavascript("navigator.ContactManager.droidDone();");
this.ctx.sendJavascript("navigator.contacts.droidDone();");
}
else {
this.ctx.sendJavascript("navigator.contacts.droidDone();");
@ -272,7 +272,7 @@ public class ContactManager implements Plugin {
else
{
if (all) {
this.ctx.sendJavascript("navigator.ContactManager.fail();");
this.ctx.sendJavascript("navigator.contacts.fail('Error');");
}
else {
this.ctx.sendJavascript("navigator.contacts.fail('None found!');");
@ -299,7 +299,7 @@ public class ContactManager implements Plugin {
if(data != null)
{
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());
this.ctx.sendJavascript("navigator.contacts.droidDoneContacts();");