How can we generate the pop up if any app sending SMS?
I mean is there any way to block outgoing SMS through any app except default SMS app?
Any application can send SMS through android Phone with help of SMSManager. for example.
SmsManager smsManager = SmsManager.getDefault();
smsManager.sendTextMessage(number, null, "message", null, null);
I want to block such SMS sending process or generate a pop-up on phone that "xyz app is trying to send SMS .. Allow or dont allow..
Any help will be appreciable...
Related
I am work on a messaging system which is send and receive sms but the requirement is the application send sms to specific number which is store in its database and it also receive sms from specific number which is store in its database . actually the client is manufacturer of GPS system with GPRS in this system a sim card is stored which is reply when the sms is send it like current location and many function .when sms will receive which number is store in database of application the sms is not show in android phone default program which is already installed in device. tell me how can i start
You can use SmsManager to send sms.
SmsManager smsManager = SmsManager.getDefault();
smsManager.sendTextMessage("phoneNo", null, "sms message", null, null);
You can use BroadcastReceiver to receive sms.
Several tutorials are available online to understand BroadcastReceiver.
I am trying to develop an app that send and receive a sms
my sms's are too long so i used a multi partsend sms method
the sms is sent successfully bu when receiving the message the character are wrongly printed in screen
please help me
i tested it in a virtual device
SmsManager sms = SmsManager.getDefault();
ArrayList<String> parts = sms.divideMessage(keyAsString);
sms.sendMultipartTextMessage(getPhoneNo().getText().toString(), null, parts, null, null);
Have you checked the phone sending and the phone receiving are using the same character sets?
I'm not entirely sure how to check because I don't know what phone you're using but if the characters look something like this phenomenon then that might be your problem: http://en.wikipedia.org/wiki/Mojibake
I've implemented code to send sms message from an Android emulator to another, which works well. But when I try to send message from the emulator or an Android device(with wifi only, no data plan or number with the phone) to a device(iPhone ), it doesn't work. I'm not quite sure if sms needs a data plan to send message in real world. Thx for the help!
SmsManager sms = SmsManager.getDefault();
sms.sendTextMessage(number, null, message, null, null);
Though sms does not require a data plan, it needs a working GSM or CDMA Network connection with call working.
SMS is Short Message Service. It's been around longer than we've had internet on phones, and definitely requires a valid SIM card and a working network connection (data over network isn't necessary, but you should be able to make calls).
How would one go about sending a silent sms (SMS class 0)? Preferably from an android device, but any input would be helpful.
AFAIK is a class 0 a instantly shown sms, but you can send a silent (user doesn't recognize that an sms is sent) sms via SmsManager
See here: SmsManager reference
I am sending SMS by using
Code:
SmsManager sms = SmsManager.getDefault();
sms.sendTextMessage(phoneNumber, null, message, sentPI, deliveredPI);
It's working fine and successfully sends a standard SMS that is automatically saved in recipient mobile inbox.
I want send the SMS as flash(notification) SMS. By this I mean that the message should be displayed immediately on recipient mobile screen but not stored.
Please tell me how can I do this.
For sending Flash SMS the Modem used should be compatible to send Flash Messages.
try sending AT+CMGF? command.This will read the value stored by modem for command CMGF Message Format
if AT+CMGF? returns 0 i.e it is in PDU mode (where entire TP data units are used)
then it is compatible
else if it returns 1 then it is in text mode (where the body of
the message and its headers are given as separate parameters)