PinetartInc
Posts: 0
Joined: Sun Jul 27, 2014 1:33 pm

Why would 'send sms' function [with twilio] work on IOS version of app and not on android version?

I've created an app that among other features sends an 'emergency' SMS and email message of phone's gps location on the touch of a button on app. In testing app, functionality works on IOS using login with fb and username and password login. App sends SMS and email.

However on Android phone, app does not send either sms or email. I've tried everything to troubleshoot this problem. I think there is a bug in appery somewhere. Does anyone have any ideas on this?

I've worked for a long time creating the app and it will be useless because the 'send' functionality is critical.

I used twilio and sendmail apis, also I've shared the app with your support team. [FIVE-ONxtGen]

PinetartInc
Posts: 0
Joined: Sun Jul 27, 2014 1:33 pm

Why would 'send sms' function [with twilio] work on IOS version of app and not on android version?

ok so android only works when i turn on wifi. I need it to use the phone's data and sms networks. People may want to use this functionality when they're outside of wifi network. Any ideas?

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Why would 'send sms' function [with twilio] work on IOS version of app and not on android version?

Hi -

Thanks for reaching out.

I'm not sure I understand how exactly you're sending SMS, could you please elaborate.

PinetartInc
Posts: 0
Joined: Sun Jul 27, 2014 1:33 pm

Why would 'send sms' function [with twilio] work on IOS version of app and not on android version?

I'm using twilio to send the SmS based on pre-set info in a collection. I'm retrieving 2 preset phone numbers and 2 present emails and sending them messages on button click.

//alert(JSON.stringify(data));

if (data.length){
var address = Apperyio.storage.address.get();
var message = data[0].Emergency_message;

Code: Select all

 if (data[0].Emergency_Phone_1){ 
     var phoneNumber1 = data[0].Emergency_Phone_1 + ""; 
     if (phoneNumber1.length == 10){ 
         phoneNumber1 = "1"+ phoneNumber1; 
     } 
     front_sendSMS.execute({data:{Body:message + " " + address, To:"+"+phoneNumber1,From:Twilio_settings.phoneNumber}}); 
 } 
 if (data[0].Emergency_phone_2){ 
     var phoneNumber2 = data[0].Emergency_phone_2 + ""; 
     if (phoneNumber2.length == 10){ 
         phoneNumber2 = "1"+ phoneNumber2; 
     } 
     front_sendSMS.execute({data:{Body:message + " " + address, To:"+"+phoneNumber2,From:Twilio_settings.phoneNumber}}); 
 } 

 if (data[0].Emergency_email_1){ 
     front_sendEmail.execute({parameters:{message:message + " " + address, email:data[0].Emergency_email_1}}); 
 } 
 if (data[0].Emergency_email_2){ 
     front_sendEmail.execute({parameters:{message:message + " " + address, email:data[0].Emergency_email_2}}); 
 } 

 alert("Emergency message has been sent"); 

}

PinetartInc
Posts: 0
Joined: Sun Jul 27, 2014 1:33 pm

Why would 'send sms' function [with twilio] work on IOS version of app and not on android version?

Why would the app only send notification when wifi is enabled? Why isn't it use the phone's data plan?

PinetartInc
Posts: 0
Joined: Sun Jul 27, 2014 1:33 pm

Why would 'send sms' function [with twilio] work on IOS version of app and not on android version?

I turned on blue tooth and turned off wifi and the SMS app worked [on android]

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Why would 'send sms' function [with twilio] work on IOS version of app and not on android version?

Hello,

Please check if there are any errors in the Weinre console. You can learn here: https://devcenter.appery.io/documenta... how to open the console.

PinetartInc
Posts: 0
Joined: Sun Jul 27, 2014 1:33 pm

Why would 'send sms' function [with twilio] work on IOS version of app and not on android version?

There are no errors in Weinre console. Can you suggest a solution? This function is a 'send gps in an emergency' feature so it needs to be able to send location when wifi is not available. Please help!

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Why would 'send sms' function [with twilio] work on IOS version of app and not on android version?

Based on your code you are executing REST services in your app, thus the issue here is related to Android permissions settings for your app (https://devcenter.appery.io/documenta...) check them carefully with your app package, try combining different combinations and then test on your device. Also some permissions can be blocked on the device itself, you need check this too with device on which you're testing.

As Sergiy said, the best way to troubleshoot service execution on the device itself is to use remote debugging tool, some AJAX requests can reach timeout on some specific cellular networks - this should be tested on your side within specific cellular network provider.

Return to “Issues”