I'm a newbie on Android development platform.
Can a third party application (say the one I'm developing) send SMS messages?
I believe we do not have access to default text messaging app. Therefore I plan to develop one on my own, which will read words used and process such texts before delivering to receiver. I would like to know if there are such APIs which allow to send text messages.
Here is a simple snippet that might help:
SmsManager smsMgr=SmsManager.getDefault();
String destination="9999119911";
String msg="Hello World";
smsMgr.sendTextMessage(destination,null,msg,null,null);
Don't Forget to add
<uses-permission android:name="android.permission.SEND_SMS"/>
to AndroidManifest.xml
Testing :
You can send SMS from one instance of emulator to another ,to do that ,simply specify the port
number of the other instance as destination .
to check the port number :
$ /opt/android-sdk/platform-tools/adb devices
http://thinkandroid.wordpress.com/2010/01/08/sending-sms-from-application/
I think this is what you are looking for. The second method described in the article does not need any additional permissions, but it requires that the user types the message. I don't think there is a way to send an SMS without the permission.
A good place to start is here http://developer.android.com/reference/android/telephony/SmsManager.html
You need to use the SmsManager class, if you want to include SMS capability in your app.
Related
We are developing an alert app that will automatically send MMS messages in certain emergency situations. We think it will qualify as an alert app exception and not be required to be the default SMS handler when we put in in the Play Store. But we aren't ready for that yet. In the mean time, developing and testing this app is very difficult because we have to make it the default SMS handler to run it. Our app is in no way capable of functioning as the default SMS handler. So, is there any way to get around this requirement while we are developing the app?
If you want to use our SMS gateway, you can use our "test numbers".
Our list of test numbers is:
+61411111111
+61422222222
+61433333333
+61444444444
+14055555555
+14055555666
+447777777777
+447778888888
+8615555555555
You would need to open a free account at clicksend.com and there is no charge for using test numbers. Of course, your test messages just go into /dev/null - maybe that's not what you need.
Don't know if that solves your specific problem, but maybe it's a piece of the puzzle. :shrug:
I can have our mobile dev team chime in if you want more help.
Michael
(Software Development Manager, ClickSend - an SMS Gateway Provider)
I am creating an app for a person I know for his company, he needs to send many SMS to his workers(shifts mostly). He asked me to create this app but now after I almost fished it I found out that there an SMS limit, is there a way to change it from the app with permissions or something and not make him dig through his root? Or at least make the annoying message pop up just once and not for every message that sends after the limit reached?
you have to use abd command to open that restrictions here is the link for tutorial
change sms limit
Go to the android platform tool directory
(C:\Users\username\AppData\Local\Android\Sdk\platform-tools)
open command shell by using Shift+mouserightclick
and enter this command
adb shell
settings put global sms_outgoing_check_max_count 5
settings put global sms_outgoing_check_interval_ms 9000000
I am actually reducing the number so Android warns me if I have sent more than 5 SMS messages within 30(9000000) minutes. Change “5” to whatever number you wan
is there a way to change it from the app with permissions or something
No, sorry.
Or at least make the annoying message pop up just once and not for every message that sends after the limit reached?
No, sorry.
If you wish to send bulk text messages, use a hosted SMS delivery service, such as Twilio.
How can an incomming Type-0 SMS (please note: "Type-0" is ment, not "Class-0") be caught by a BroadcastReceiver?
Background: For configuration purposes Type-0 SMS (with TP-PID=ME data download) are sent. This needs to be "intercepted" by an Android application and the data inside the message needs to be retrieved/ decoded.
So the intention is to READ Type-0 SMS, NOT sending it!
Is it possible with Android at all? Is perhaps a native app necessary?
Thanks and kind regards!
Consider looking into this project as they have accomplished this:
https://github.com/SecUpwN/Android-IMSI-Catcher-Detector
You can do it natively in Android. About 10 years ago, Google made silent sms really silent. So, just reverse that commit. Android Commit to silence type zero sms
In later versions of android, the corresponding files have been moved to /frameworks/opt/telephony/src/java/com/android/internal/telephony/gsm. They are SmsMessage.java and GsmInboundSmsHandler.java
I wonder is it possible to not just simply launch an Android app (which we plan to develop ourselves allowing for that purpose) by having the NFC signal include some parameters and pass such parameters to the Android app via NFC so that, dependent on the parameter passed, e.g. a certain part of the app is accessed and/or the opening app automatically reads and saved the chips serial number?
Are such a more advanced features possible using NFC is is it limited just to "launch that app" and that's it?
THANKS A MILLION
Yes it is possible. You can define several criteria for launching the application. Once it is launched you can process in by the application code complete NDEF message.
It won't make any sense to start the application without passing the data - in such a case you will need anyway read the NFC tag or receive the NDEF over NPP/SNEP after the application will be started, so it is logical those information are already passed to the Intent.
BR
STeN
You should have a look at the Android Application Record. Placed it within an NDEF message, you can additionally add an External Type Record or some text-, uri-, or mimerecord depending on your needs. I have put together an NFC Eclipse plugin which should get you started.
I can start my application by simply putting the phone on a NFC-tag. But I would like to take the idea one step further. Imagine a simple time-tracking application with two NFC-tags. The first will start (and download) the application and register a starttime. The other will also start (and download) the application, but register a stoptime.
My problem I'd like to solve is that I don't want my phone to know about these tags. The application should not need to have a list of tag-ids programmed and know what actions that is connected to each id. The tag should carry the information needed to start the action on the phone with the correct parameters.
Are there any information about how to accomplish this scenario? I have installed "nfc-eclipse-plugin" but doesn't understand how to use it to get my goal and even less how to get my application to read the extra data.
Thanks in advance
Roland
Your tags should be capable of storing NDEF messages. Such messages are automatically read out by Android and passed to your app in an Intent. Automatically installing and/or starting your app can be accomplished by putting an Android Application Record in your tag. Any additional information ("start" or "stop" indication) can be stored in a proprietary record.
You probably want to put the AAR as the last record of the NDEF message, as it is detected and acted upon by Android automatically, but is only supported since ICS. To make automatic installation work with Gingerbread, you can put an additional URI record or SmartPoster record with a Google Play Store link in it as the first record of the message. Your app should then filter (ACTION_NDEF_DISCOVERED) for this URI, so it will also start automatically on Gingerbread.