sms

SmsManager.sendDataMessage(…, onSpecificPort , …,.. ) Is not Filtering SMS On Port Basis

本小妞迷上赌 提交于 2019-12-12 03:16:16
问题 What i want to do is Send SMS on a specific PORT and application listening to sms receiving for the same port should only react to the sms receiving. I have a receiver like this <receiver android:name=".BinarySMSReceiver"> <intent-filter> <action android:name="android.intent.action.DATA_SMS_RECEIVED"/> <data android:port="8091"/> <data android:scheme="sms"/> </intent-filter> </receiver> and sending sms like below manager.sendDataMessage(phonenumber, null, (short) SMS_PORT, data, piSend,

How to get sent sms list?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 02:53:56
问题 I am developing one application, based on that application i reseved messages. My Code is as follows, public class SmsReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { //---get the SMS message passed in--- Bundle bundle = intent.getExtras(); SmsMessage[] msgs = null; String str=""; if (bundle != null) { //---retrieve the SMS message received--- Object[] pdus = (Object[]) bundle.get("pdus"); msgs = new SmsMessage[pdus.length]; for (int i=0;

sms scheduling in android

試著忘記壹切 提交于 2019-12-12 02:35:02
问题 I want to make an SMS scheduling app, that sends SMS at predefined time. I have decided to use a timer for that purpose. During my research, I found out that Alarm Manager was more appropriate option for scheduling one time events in android. Any guidance would be fruitful. I want to implement the timer in my service as shown in the give code: public class SMSTimerService extends Service { private Timer timer = new Timer(); Long delay = 10000L;//for long we have to keep L at the last of the

Sms Notification from Android Apps

丶灬走出姿态 提交于 2019-12-12 02:29:36
问题 we need to develop an android application for our customers .Our main objective is when the customer will place an order we should be notified on our mobile via SMS. Any suggestion will be highly appreciated. 回答1: then try following method: //---sends an SMS message to another device--- private void sendSMS(String phoneNumber, String message) { SmsManager sms = SmsManager.getDefault(); sms.sendTextMessage(phoneNumber, null, message, null, null); } And call that method for an sms send: sendSMS

What is standard format phone number to send SMS?

烂漫一生 提交于 2019-12-12 02:24:00
问题 My app used SMSManager to send SMS to number which saved in Contact List SmsManager smsManager = SmsManager.getDefault(); smsManager.sendTextMessage("phoneNo", null, "sms message", null, null); I got feedback from user, some number in their contact list can not receive SMS from the app. Seem this issue relate with format phone number for each country. A user from US feedback the Phone Number of this format can not receive SMS. Number : (555)444-6666 I think I should convert the phone number

how to stop the application from opening in android

試著忘記壹切 提交于 2019-12-12 02:22:01
问题 I am developing a simple SMS Application in android,i am able to send and receive messages. during receiving of sms i want my application should open whenever the sms comes from a specified number with some notification within the app and it shouldnot open whenever it comes from unspecified number.. what i am able to do is open the app whenever the message comes from the specified number but not able to stop my application from getting invoked(incase of unspecified number). Help.. 回答1: Your

Keeping count of the number of SMS's sent in Android

↘锁芯ラ 提交于 2019-12-12 02:12:24
问题 I want to track the number of messages that are sent from an android phone. I'm aware that there is a Broadcast message whenever a SMS is received but there is no particular event for a sent message. I don't wanna end up counting the number of messages that appear in the "sent" area cos if I delete a sent message, the count will get changed. 回答1: Two possible solutions: You could read the sent messages folder on a schedule, and only count the messages with time stamps that were sent between

show progress dialog while waiting for receiving SMS

浪子不回头ぞ 提交于 2019-12-12 01:50:01
问题 I would like to write an app to show a progress dialog while waiting to receive a SMS. When receiving SMS, the non-null TextView smsReceive is served as the condition to dismiss progress dialog. But it gets runtimeException. Could you show me what to change in the code. package cx.opseng.PerfTOLD; import android.app.Activity; import android.app.ProgressDialog; import android.os.Bundle; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent;

how to get list of installed instant messenger apps?

 ̄綄美尐妖づ 提交于 2019-12-12 01:49:35
问题 My app should be able to send the text in a TextView via WhatsApp, Email, SMS etc. For that i need a list of installed Messging Applications. I tried it with the PackageManger but i get all apps. How can i get only the Instant Messaging Apps? This is my code to list the installed apps: PackageManager packageManager=this.getPackageManager(); List<PackageInfo> applist=packageManager.getInstalledPackages(0); Iterator<PackageInfo> it=applist.iterator(); while(it.hasNext()){ PackageInfo pk=

Android — intent chooser for whatsapp and sms only

南笙酒味 提交于 2019-12-12 01:44:15
问题 I want to create an IntentChooser who offer to share text only via SMS or WhatsApp. Here is my code to share via WhatsApp: Intent localIntent = new Intent(Intent.ACTION_SEND); localIntent.setType("text/plain"); localIntent.setPackage("com.whatsapp"); if (localIntent != null) { localIntent.putExtra(Intent.EXTRA_TEXT, "Hi there! I'm using this app"); startActivity(Intent.createChooser(localIntent, "Hi there! I'm using this app"); } I need to add to this also sharing with SMS. How can I do it?