Programatically sending SMS

462 views
Skip to first unread message

Hatim Haidry

unread,
Oct 12, 2010, 2:35:48 AM10/12/10
to rhomobile
Hello,

How to send SMS programatically in rhodes application by using an API
which would take paramaters as DestinationNumber and MessageToSend?
This API would interact with Mobile built-in SMS features internally
and send SMS through its SIM Card.

Or Is there any better alternative to suggest to fulfill this
requirement?

Thanks
Hatim

Hatim Haidry

unread,
Oct 14, 2010, 11:35:30 PM10/14/10
to rhomobile
Hello Rhomobile,

It is a followup mail for below mentioned query. Since we need to
create a proof of concept for this sms integration using rhodes
application. Please reply it as the earliest

Thanks
Hatim

evgeny vovchenko

unread,
Oct 15, 2010, 1:28:17 AM10/15/10
to rhom...@googlegroups.com
You can send SMS using special url:
http://wiki.rhomobile.com/index.php/RhodesDeviceCapabilities#Send_mail.2C_ca
ll_number.2C_send_SMS_and_open_appstore_urls

You can create such url in controller code and call WebView.navigate to this
url

Hello Rhomobile,

Thanks
Hatim

--
You received this message because you are subscribed to the Google Groups
"rhomobile" group.
To post to this group, send email to rhom...@googlegroups.com.
To unsubscribe from this group, send email to
rhomobile+...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rhomobile?hl=en.

Hatim Haidry

unread,
Oct 15, 2010, 2:19:20 AM10/15/10
to rhomobile
Hello Evgeny,

I tried the href mentioned in rhodes document e.g <a href="sms:
+3581234567">Send SMS to us </a> first in erb file, It opens the SMS
application of the mobile device itself where we have to enter the
text message manually.

However my requirement is to send the SMS without typing the message.
The mobile number and text message is already stored somewhere in our
application. When we click on certain link, it would automatically
send the SMS with that number and text message. Please suggest.

Furthermore when we use the same sms link in WebView.navigate in
controller code e.g

WebView.navigate( url_for( "href=sms:9870002637") )
or
WebView.navigate( "href=sms:9870002637" )
or
WebView.navigate( "sms:9870002637" )

In all the cases, it gives an error as "404 Not Found. The file sms:
9870002637 was not found"

Please suggest how do we use this sms link in controller code?



On Oct 15, 10:28 am, "evgeny vovchenko" <evgenyvovche...@gmail.com>
wrote:
> You can send SMS using special url:http://wiki.rhomobile.com/index.php/RhodesDeviceCapabilities#Send_mai...
> ll_number.2C_send_SMS_and_open_appstore_urls
>
> You can create such url in controller code and call WebView.navigate to this
> url
>
>
>
> -----Original Message-----
> From: rhom...@googlegroups.com [mailto:rhom...@googlegroups.com] On
>
> Behalf Of Hatim Haidry
> Sent: Friday, October 15, 2010 7:36 AM
> To: rhomobile
> Subject: [rhomobile] Re: Programatically sending SMS
>
> Hello Rhomobile,
>
> It is a followup mail for below mentioned query. Since we need to create a
> proof of concept for this sms integration using rhodes application. Please
> reply it as the earliest
>
> Thanks
> Hatim
>
> On Oct 12, 11:35šam, Hatim Haidry <haidryha...@gmail.com> wrote:
> > Hello,
>
> > How to send SMS programatically in rhodes application by using an API
> > which would take paramaters as DestinationNumber and MessageToSend?
> > This API would interact with Mobile built-in SMS features internally
> > and send SMS through its SIM Card.
>
> > Or Is there any better alternative to suggest to fulfill this
> > requirement?
>
> > Thanks
> > Hatim
>
> --
> You received this message because you are subscribed to the Google Groups
> "rhomobile" group.
> To post to this group, send email to rhom...@googlegroups.com.
> To unsubscribe from this group, send email to
> rhomobile+...@googlegroups.com.
> For more options, visit this group athttp://groups.google.com/group/rhomobile?hl=en.- Hide quoted text -
>
> - Show quoted text -

Dmitry Moskalchuk

unread,
Oct 15, 2010, 4:03:51 AM10/15/10
to rhom...@googlegroups.com
Hi,

1. No, Rhodes don't support silent SMS sending. User interaction
required. I don't think sending SMS silently is a good idea. Users
obviously don't like applications which silently spend theirs money. :)

2. Which mobile platform you used? Want to check it for
WebView.navigate('sms:....') stuff.

Dmitry Moskalchuk

Hatim Haidry

unread,
Oct 15, 2010, 6:46:33 AM10/15/10
to rhomobile
Hello

1. The business requirement is such that whenever User presses the
"Send SMS" button on particular form of an application, the SMS would
silently send to the selected contact number with the predefined text
message stored inside database. In this case the User interacting with
the application to send the sms.

2. I tried with WebView.navigate( 'sms:9870002637' ) in controller,
however it gives the same error as "404 Not Found. The file /sms:
9870002637 was not found"

I have tested on following platforms
- Windows mobile platform version 6.0 simulator
- Windows mobile device OS version 5.2.21869, Device Model
Number HTC HD2 T8585
- Android simlator version 2.2
- Android mobile device Firmware version 2.1-update 1, Device
Model Number HTC Hero

Thanks
Hatim
> >> For more options, visit this group athttp://groups.google.com/group/rhomobile?hl=en.-Hide quoted text -
>
> >> - Show quoted text -- Hide quoted text -

Dmitry Moskalchuk

unread,
Oct 15, 2010, 12:31:57 PM10/15/10
to rhom...@googlegroups.com
1. Well, I got your point but this is not supported now by Rhodes. Wait till we implement it or write native extension adding required feature.

2. Will look on this, please wait.


--
Dmitry Moskalchuk

15.10.2010, в 14:46, Hatim Haidry написал(а):

tuxito

unread,
Jan 16, 2012, 2:54:40 PM1/16/12
to rhom...@googlegroups.com
Hello,

Just I am trying to send sms functionality and now I have in my controller called like this:
WebView.navigate ("sms:973924125?body=test")

This works correctly in Android 2.2 but not work on Android 2.3 or an Iphone. In the case of Android 2.3, the body of the text puts it next to the number and the Iphone does not put anything

shobhit sidana

unread,
May 10, 2012, 12:38:26 AM5/10/12
to rhom...@googlegroups.com
Hi All,


My requirement is to send the SMS without typing the message.
The mobile number and text message is already stored somewhere in our application. When we click on certain link, it would automatically send the SMS with that number and text message and without clickin on send button.
 Please suggest.
Please reply ASAP.


Thanks and Regards
Shobhit Sidana

Egghead

unread,
May 10, 2012, 3:23:13 AM5/10/12
to rhom...@googlegroups.com
I get your point, clicking or not even clicking at all (e.g., when an event takes place, like when it's a due date for a loan repayment): Well, why not use an SMS Gateway for these tasks, for both push (event driven) and pull (to get SMS, not send, could also be event driven).

shobhit sidana

unread,
May 14, 2012, 11:13:06 AM5/14/12
to rhom...@googlegroups.com
Hi Egghead,
 
Thanks for replying .Yes i can use some gateway but for that i need GPRS connectivity, but my main concern is that i want to send sms using SIM sms pack.
I know there are so many gateways available in the market but those gateways works only when there is net connectivity(for eg. some bank employee is collecting money from customer and he/she made a transaction in offline mode and bank is not aware of that, in this scenerio i want to send some silent sms confirmation to bank through his/her SIM sms service because sms gateway works only in GPRS/net connectivity)

Jon Tara

unread,
May 14, 2012, 11:38:47 AM5/14/12
to rhom...@googlegroups.com
This won't work on iOS, with or without support from Rhodes, because Apple doesn't permit this type of use of SMS by apps.

On Android, you can do this, because Android has a fine-grained permission system. The user will have to explicitly give permission for the app to send SMSs.

Typically, this type of thing is done by servers, not mobile apps. For example, the popular Square mobile payment app sends you a receipt by SMS after the merchant swipes your card. But the receipt is sent by Square's server, not the mobile app.

There's no reason you couldn't set-up a server that connects to some gateway to send the SMSs at the proper time. You'd need network connectivity at some time if the mobile app needs to send some schedule information to the server.

shobhit sidana

unread,
May 14, 2012, 11:49:48 AM5/14/12
to rhom...@googlegroups.com
Hi Jon Tara,

I want to send SMS in background on some event using GSM( without using GPRS) using some way in RhoMobile (For Android,BlackBerry,Windows,Symbian).



Jon Tara

unread,
May 14, 2012, 12:51:28 PM5/14/12
to rhom...@googlegroups.com
On Monday, May 14, 2012 8:49:48 AM UTC-7, shobhit sidana wrote:
want to send SMS in background on some event using GSM( without using GPRS) using some way in RhoMobile (For Android,BlackBerry,Windows,Symbian).

You will need to write a Rhodes extension to do that, since Rhodes doesn't currently support it.

You will need to research each platform, see if the platform supports it at all, and if so, then write an extension if it does.

You can easily find how to do this for Android with an Internet search.

Mohit Tyagi

unread,
May 14, 2012, 11:33:49 PM5/14/12
to rhom...@googlegroups.com
Hi Jon,
 
Can you please provide any example( or any helpful link ) of writing Rhodes extension?
 
Regards,
Mohit

Jon Tara

unread,
May 15, 2012, 10:48:23 AM5/15/12
to rhom...@googlegroups.com
On Monday, May 14, 2012 8:33:49 PM UTC-7, Mohit Tyagi wrote:

 Can you please provide any example( or any helpful link ) of writing Rhodes extension?

SheR

unread,
Jan 7, 2014, 6:53:12 AM1/7/14
to rhom...@googlegroups.com, shobhit...@gmail.com
Hi Shobit

I am facing an exactly similar problem for the same scenario. Please help me with the kind of approach you followed to solve this problem.

Thanks in advance.

SheR

unread,
Jan 24, 2014, 8:54:07 AM1/24/14
to rhom...@googlegroups.com
Jon

Where should I add the permission android.permission.SEND_SMS in the rhomobile app?  
Reply all
Reply to author
Forward
0 new messages