title: nativescript-phone prevents Nativescript-contacts from returning
body: <p>I have an app where I want to select a person from contacts and then send a text to that person.  It works as expected for the first user, but after that the app never receives control after the contact is selected.  I've isolated the problem to the Nativescript-phone plugin.  If you simply call phone.sms() to send a text, and then call contacts.getContact(), the problem occurs. I see this on both Android and iOS.  </p>
  
  <p>I've created a sample app that demos the problem at <a href="https://github.com/dlcole/contactTester" rel="nofollow noreferrer">https://github.com/dlcole/contactTester</a>. The sample app is Android only.  I've spent a couple days on this and welcome any insights. </p>
  
  <p>Edit 4/21/2020: </p>
  
  <p>I've spent more time on this and can see what's happening.  Both plugins have the same event handler and same request codes:  </p>
  
  <p>nativescript-phone: </p>
  
  <pre><code>var SEND_SMS = 1001;
  activity.onActivityResult = function(requestCode, resultCode, data) {
  </code></pre>
  
  <p>nativescript-contacts: </p>
  
  <pre><code>var PICK_CONTACT = 1001;
  appModule.android.on("activityResult", function(eventData) {
  </code></pre>
  
  <p>What happens is that after invoking phone.sms, calling contacts.getContact causes control to return to the phone plugin, and NOT the contacts plugin.  I tried changing phone's request code to 1002 but had the same results. </p>
  
  <p>So, the next step is to determine how to avoid the collision of the event handlers. </p>