Return-Path: X-Original-To: apmail-cordova-issues-archive@minotaur.apache.org Delivered-To: apmail-cordova-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 19538186D7 for ; Wed, 30 Dec 2015 11:52:50 +0000 (UTC) Received: (qmail 57703 invoked by uid 500); 30 Dec 2015 11:52:49 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 57669 invoked by uid 500); 30 Dec 2015 11:52:49 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 57658 invoked by uid 99); 30 Dec 2015 11:52:49 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Dec 2015 11:52:49 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id A50802C14F9 for ; Wed, 30 Dec 2015 11:52:49 +0000 (UTC) Date: Wed, 30 Dec 2015 11:52:49 +0000 (UTC) From: "Vladimir Kotikov (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-10192) Native Android Contacts app crashed after creating new contact in Cordova app MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-10192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15074968#comment-15074968 ] Vladimir Kotikov commented on CB-10192: --------------------------------------- There is https://github.com/apache/cordova-plugin-contacts/releases/tag/2.0.0, but you need to specify version explicitly. Also it requires cordova-android >= 5.0.0, so you will need for something like this: {noformat} cordova platform rm android cordova platform add android@5.0.0 cordova plugin add cordova-plugin-contacts@2.0.0 {noformat} > Native Android Contacts app crashed after creating new contact in Cordova app > ----------------------------------------------------------------------------- > > Key: CB-10192 > URL: https://issues.apache.org/jira/browse/CB-10192 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Contacts > Affects Versions: 1.1.0 > Environment: Google Nexus 6 Marshmallow > Cordova : 5.4.0 > Contacts Plugin: 1.1.0 > Reporter: Sumama Waheed > Assignee: Vladimir Kotikov > Labels: Android, contact.save, triaged > > I successfully create a new contact with minimal fields like First Name and Given Name. > The contact is created successfully and you can see it in the native Android contacts app if you scroll to the correct place. > However, if you search for the new contact by name, it crashes the Contacts app every time until you delete that contact !!. > Cordova : 5.4.0 > Contacts Plugin: 1.1.0 > This is how I am creating the contact: > {code:javascript} > var contact = navigator.contacts.create(); > contact.displayName = firstName + " " + lastName; > contact.nickname = firstName; > var name = new ContactName(); > name.givenName = firstName; > name.familyName = lastName; > contact.name = name; > var phoneNumbers = []; > phoneNumbers.push(new ContactField('work', workPhone, false)); > phoneNumbers.push(new ContactField('mobile', mobilePhone, true)); // preferred number > contact.phoneNumbers = phoneNumbers; > var organizations = []; > organizations.push(new ContactOrganization(true, "work", "Company", "Company", "Supervisor")); > contact.organizations = organizations; > contact.save(onSuccess,onError); > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org For additional commands, e-mail: issues-help@cordova.apache.org