java - Display received messages in the default SMS app and the native messaging app -


I created a messaging app that can be set as the default SMS app in KitKat (Android 4.4). This app listens to a specific message and catches it, then raises an event after receiving them. The problem is that the messages I do not need to catch are not visible in the original messaging inbox, how can I display those messages in the original messaging app on the device while keeping my app as default?

When your app is the default SMS app, it is responsible for writing incoming messages to the provider Because this is the only app in which it has write access, the following is a very simple, minimal example, and assumes that you have the following import:

  Import android.provider .Telephony. *;   

And the method of writing examples:

  Enter Private Zero SMS (string number, string message) {ContentValues ​​smsValues ​​= New ContentValues (); smsValues.put (Sms.ADDRESS, number); smsValues.put (SMS. BODY, messages); SmsValues.put (Sms.DATE, System.currentTimeMillis ()); context.getContentResolver () Insert (Sms.Inbox.CONTENT_URI, smsValues); }    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -