Ionic Hybrid Android Mobile App - Email and SMS Intents


#1

I am working on a hybrid Android mobile app using NodeJS v11.9.0, npm v6.5.0, ionic v3.19.0, cordova 8.0.0, and Android Studio 3.2.0

When i use below ionic 3.19.0 code send sms email id not working

sendMessage(){
    var options:{
        replaceLineBreaks:true,
        android:{
            intent: 'INTENT'
        }
    }
    if(this.sms) {
        this.sms.send("0871357817", "Test Message",options).then((succes) => {
            alert('Message sent successfully');
        }, (error) => {
            alert(JSON.stringify(error));
        });
    }
}

have installed below plugin - https://ionicframework.com/docs/native/sms

added the required permissions
<uses-permission android:name="android.permission.SEND_SMS"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.READ_CONTACTS"/>

again and again same issues, see below
2019-03-14 19:55:04.469 10891-10891/io.ionic.starter D/SystemWebChromeClient: ng:///AppModule/MonitorPage.ngfactory.js: Line 23 : ERROR
2019-03-14 19:55:04.470 10891-10891/io.ionic.starter I/chromium: [INFO:CONSOLE(23)] “ERROR”, source: ng:///AppModule/MonitorPage.ngfactory.js (23)
2019-03-14 19:55:04.470 3706-4938/? D/WindowManager: adjustSystemUiVisibilityLw : vis= 0x2608
2019-03-14 19:55:04.471 10891-10891/io.ionic.starter D/SystemWebChromeClient: ng:///AppModule/MonitorPage.ngfactory.js: Line 23 : ERROR CONTEXT
2019-03-14 19:55:04.471 10891-10891/io.ionic.starter I/chromium: [INFO:CONSOLE(23)] “ERROR CONTEXT”, source: ng:///AppModule/MonitorPage.ngfactory.js (23)

I know how to do this with Native Android but I need help with Ionic


#2

I updated to ionic 4.1.1 and made some modifications/syntax due to have ionic 4.1.1 is set up and everything is working now.