SocialSharing.shareViaSMS don't comes back to the app

After send a SMS or even by pressing back key it don’t come back to my app. Instead it navigates back through screens of SMS app and finally go to the Android’s start screen.

When making a phone call via a tel link using InAppBrowser it comes back to my app, although it not comes back directly. Send a email via SocialSharing.shareViaEmail also allows to come back to my app.

Edit.:

It’s happening on Android 6.0 on emulator. On device (Android 5) SMS navigation seems to be acting correctly, but email navigation not.

Hmm, interesting. Could you put together a small demo and push it to github? I have not seen this before so I’m not 100% sure what could be going on.

Cannot post an complete example right now, but will post a sample of my code:

import { Component } from '@angular/core';
import { NavController, Platform } from 'ionic-angular';
import { SocialSharing, Contact, Contacts, ContactFindOptions, ContactField } from 'ionic-native';

declare var cordova: any;

@Component({
  templateUrl: 'build/pages/share/share.html'
})
export class IndiquePage {

  contact: Contact;

  constructor(private nav: NavController, private platform: Platform) {
  }

  pickContact(){
      this.platform.ready().then(()=>{
          Contacts.pickContact().then(
              contact => {
                  this.contact = contact;
              },
              error  => {
                  console.error('Error selecting contact', JSON.stringify(error, null, 4))
              }
          )            
      });

  }

  shareByPhone(phone:string, contact: Contact) {      
    var uri = 'tel:' + phone;
    uri = uri.replace(new RegExp('-', 'g'), '');
    uri = uri.replace(new RegExp(' ', 'g'), '');
    this.launch(uri);
  }

  shareBySMS(phone:string, contact: Contact) {
      var _phone = phone.replace(new RegExp('-', 'g'), '');
      _phone =     _phone.replace(new RegExp(' ', 'g'), '');  
      /*
      SocialSharing.canShareVia('sms').then(
          result => {
              console.log('Message can be shared via.',  JSON.stringify(result,null,4));
              */
              var message = this.getMessage();
              var sms  = message.subject + ' ' + message.content;
              SocialSharing.shareViaSMS(sms, _phone).then(
                  result => {
                      //console.log('Message shared via SMS', JSON.stringify(result,null,4));                      
                  },
                  error => {
                      console.log('Error shareing message via SMS', JSON.stringify(error,null,4));
                  }
              ); 

              /*
          },
          error => {              
              console.error('Cannot share message via email:', JSON.stringify(error,null,4));
          }
      )
      */

  }

  shareByEmail(email:string, contact:Contact) {
      SocialSharing.canShareViaEmail().then(
          result => {

              //console.log('Can share via email:', JSON.stringify(result,null,4));              

              var message = this.getMessage();
              

              SocialSharing.shareViaEmail(message.content, message.subject, [email]).then(
                  result => {
                      console.log('Message shared via email', JSON.stringify(result,null,4));
                  },
                  error => {
                      console.log('Error sharing message via email', JSON.stringify(error,null,4));
                  }
              );              
          },
          error => {
              console.error('Cannot share via email:', JSON.stringify(error,null,4));
          }
      )
  }

  launch(url) {    
    console.log('URL', url);
    this.platform.ready().then(() => {
     cordova.InAppBrowser.open(url, "_system", "location=true");
    });
  }
 
  getMessage() {
    return {
      subject: 'This is an subject',
      content: 'This is a message'
    }
  }

}