But, does anyone know how I could access the sms inbox from my phone's database? As far as I have figured out, this was better documented on pervious version of the Android API. I cant even find the constants of the perimssion that I have to add to the Manifest file of my application. Has anyone figured out these issues?
On Mar 27, 9:04 am, John <johnliug...@gmail.com> wrote: > try this method: > > PendingIntent pi = PendingIntent.getActivity(this, 0, > new Intent(this,SMS.class), 0); > SmsManagersms= SmsManager.getDefault(); > sms.sendTextMessage(phoneNumber, null, message, pi, > null); > > it works well. > > On Mar 18, 4:53 am, Seer <gilligan.ch...@gmail.com> wrote: > > > > Thanks for your update. So you exactly have done two things: > > > 1. Call SmsManager::sendTextMessage( ) > > > 2. Put the sentSMSto its database via ContentResolver::insert( ) > > > The code i gave you only adds a record to the phonessmsdatabase to > > say ansmshas been sent and it will be visible to the user. In my > > own code else where i have the code to send thesms. > > > On Mar 18, 1:53 am, Kenny <yxw...@gmail.com> wrote: > > > > Thanks for your update. So you exactly have done two things: > > > 1. Call SmsManager::sendTextMessage( ) > > > 2. Put the sentSMSto its database via ContentResolver::insert( ) > > > > Kenny > > > > On Mar 17, 6:42 am, Seer <gilligan.ch...@gmail.com> wrote: > > > > > i have been trying to do the same thing and just worked it out. you > > > > want to do something similar to this. > > > > <uses-permission android:name="android.permission.WRITE_SMS"/> > > > > > public static final String ADDRESS = "address"; > > > > public static final String PERSON = "person"; > > > > public static final String DATE = "date"; > > > > public static final StringREAD= "read"; > > > > public static final String STATUS = "status"; > > > > public static final String TYPE = "type"; > > > > public static final String BODY = "body"; > > > > public static final int MESSAGE_TYPE_INBOX = 1; > > > > public static final int MESSAGE_TYPE_SENT = 2; > > > > > ContentValues values = new ContentValues(); > > > > values.put(SMSHelper.ADDRESS, "+61408219690"); > > > > values.put(SMSHelper.DATE, "1237080365055"); > > > > values.put(SMSHelper.READ, 1); > > > > values.put(SMSHelper.STATUS, -1); > > > > values.put(SMSHelper.TYPE, 2); > > > > values.put(SMSHelper.BODY, "SMSinserting test"); > > > > Uri inserted = > > > > getContentResolver().insert(Uri.parse("content:// > > > >sms"), values); > > > > > That is from a few different classes but i am sure you can work out > > > > how it fits. > > > > > On Mar 13, 8:09 pm, senthil <senthil...@gmail.com> wrote: > > > > > > HI, > > > > > Iam sending thesmsby using the below code, > > > > > SmsManager smsManager = SmsManager.getDefault(); > > > > > smsManager.sendTextMessage(destAddr, null, mMessageText, il, null); > > > > > > But, the sameSMSmessage needs to be reflected in the Nativesms > > > > >inbox, > > > > > Can anyone help me out in achieving this > > > > > > Thanks in Advance !- Hide quoted text - > > > > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---