How to save SMS to inbox in android?

You can use the sms content provider to read and write sms messages: ContentValues values = new ContentValues(); values.put(“address”, “123456789”); values.put(“body”, “foo bar”); getContentResolver().insert(Uri.parse(“content://sms/sent”), values); I don’t know why you would want to write a message you send to the inbox but if that is what you want just change the above uri to “content://sms/inbox”. … Read more

Programmatic SMS [closed]

Use http://www.twilio.com/ They have a REST interface to send SMS’s and even to establish phone calls or receive phone calls. You even get 30$ credits to try it out. Def. the cheapest solution you will find.

How to get sms sent confirmation for each contact/person in android?

This is a very simple example to demonstrate the use of the send and delivery PendingIntents available for all of the SmsManager#send*() methods, and attaching data to those to easily differentiate the results in the Receiver. Attaching that data is as simple as putting extras on the Intents backing the PendingIntents we pass to the … Read more

Send a SMS via intent

I have developed this functionality from one Blog. There are 2 ways you can send SMS. Open native SMS composer write your message and send from your Android application This is the code of 1st method. Main.xml <?xml version=”1.0″ encoding=”utf-8″?> <RelativeLayout android:id=”@+id/relativeLayout1″ android:layout_width=”fill_parent” android:layout_height=”fill_parent” xmlns:android=”http://schemas.android.com/apk/res/android”> <Button android:id=”@+id/btnSendSMS” android:layout_height=”wrap_content” android:layout_width=”wrap_content” android:text=”Send SMS” android:layout_centerInParent=”true” android:onClick=”sendSMS”> </Button> </RelativeLayout> … Read more

Android: Share plain text using intent (to all messaging apps)

Use the code as: /*Create an ACTION_SEND Intent*/ Intent intent = new Intent(android.content.Intent.ACTION_SEND); /*This will be the actual content you wish you share.*/ String shareBody = “Here is the share content body”; /*The type of the content is text, obviously.*/ intent.setType(“text/plain”); /*Applying information Subject and Body.*/ intent.putExtra(android.content.Intent.EXTRA_SUBJECT, getString(R.string.share_subject)); intent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody); /*Fire!*/ startActivity(Intent.createChooser(intent, getString(R.string.share_using)));

How to send multiple sms to single number

I found a problem with the item click listener replace your method. I hope it works: @Override public void onItemClick(AdapterView<?> arg0, View v, int arg2, long arg3) { TextView label = (TextView) v.getTag(R.id.tvSMSSend); CheckBox checkbox = (CheckBox) v.getTag(R.id.cbSelect); Toast.makeText(v.getContext(), label.getText().toString() + ” ” + isCheckedOrNot(checkbox), Toast.LENGTH_LONG).show(); list.get(arg2).setSelected(!list.get(arg2).isSelected()); }

Android PendingIntent extras, not received by BroadcastReceiver

I guess there are some issues with registering and unregistering in the code. Instead I registered the two BroadcastReceivers in the AndroidManifest.xml file and was able to successfully pass extras. AndroidManifest.xml <?xml version=”1.0″ encoding=”utf-8″ ?> <manifest xmlns:android=”http://schemas.android.com/apk/res/android” package=”com.myexample” android:versionCode=”1″ android:versionName=”1.0″> <uses-sdk android:minSdkVersion=”16″ android:targetSdkVersion=”17″ /> <uses-permission android:name=”android.permission.READ_CONTACTS” /> <uses-permission android:name=”android.permission.READ_PHONE_STATE” /> <uses-permission android:name=”android.permission.SEND_SMS” /> <uses-permission android:name=”android.permission.RECEIVE_SMS” … Read more

Android KitKat (API 19) – How to write messages in SMS Content Provider, without sending them, from Non-Default App?

The SmsWriteOpUtils class uses reflection to access methods of the AppOpsManager Service in order to enable/disable a non-default SMS app’s write access to the SMS Provider in API Level 19 (KitKat). Once set, an app’s access mode will be retained until it is reset, or the app is uninstalled. Enabling an app’s write access allows … Read more

Receiving SMS on Android App

Here is my implementation of receiving sms messages. Sms message may be broken into many, notice how it is treated. Also check the android:priority attribute. public class SmsReceiver extends BroadcastReceiver { private static final String SMS_RECEIVED = “android.provider.Telephony.SMS_RECEIVED”; @Override public void onReceive(Context context, Intent intent) { if (intent.getAction().equals(SMS_RECEIVED)) { Bundle bundle = intent.getExtras(); if (bundle … Read more

how to get the message when receiving the “kCTMessageReceivedNotification” notification on IOS5

Here’s what I found … Just looking at the dumped private APIs, it looks like ChatKit.framework could help. Take a look at CKSMSService.h or CKMadridService.h for iMessage messages. I did quickly attempt to swizzle my own method in, for a couple methods in CKSMSService: – (void)_receivedMessage: (id)arg1 replace:(BOOL)arg2 replacedRecordIdentifier:(int)arg3 postInternalNotification:(BOOL)arg4; – (void)_receivedMessage: (id)arg1 replace:(BOOL)arg2 postInternalNotification:(BOOL)arg3; … Read more