I sending message using SMSManager, I can able to send the message but I want to save it in a message conversation (Default Message Application in Device)?
What i did is
ContentValues values = new ContentValues();
values.put("body", "foo bar");
I can able to add it in the inbox but
As CommansWare comment from here,
The SMS content provider is not part of the Android SDK. Your code will break on devices that replace the SMS client with their own. Your code may break in future versions of Android
I dont have device to test in latest version, What will be the solution for all the version of android?
The content uri is not part of Android sdk. Although I haven't seen any devices that use alternative uri for sms provider, but it could be one. I think there is tiny possibility that Google will change this uri string to another one in the future. But vendor can also modify this. So generally there are no silver bullet for all the versions of Android.
As PLB said, you can add some updating and bug reporting feature to your application. When device updates to a version that has different provider, notify user about it and if you create new app that handles changes ask your customer to download one. And if your code fail to read/write the current uri. Report some information about the device to you. So you will be able to fix it up.
I first thought that maybe you can automatically look up the bytecode(dex bytecode) of the com.android.providers.telephony.SmsProvider. However, this is not part of Android sdk too.