Get all sms/mms sent to one specific phone number in Android - android

I am trying to get the list of all the sms/mms sent to one particular phone number. I have been able to do this by getting at least one sms/mms from that number and then based on the thread_id, I get the sent sms/mms to that phone number. However, I have not been able to filter Sent SMS/MMS based on the destination number given I am the sender. Any ideas ? I know that Android doesn't support interaction with SMS/MMS officially, at least, not up to API level 18.

You are right, although android doesn't support sms and mms interaction you can query the content provider responsible for the handling of sms and mms data.
Since you can query the content provider related to sms and mms data you can know the sent sms and mms and the destination of that sms and mms message.
I didn't flaged this answer as duplicate because the idea behind it is slightly different from the following link:
You can use this answer to build what you want to achieve:
How to Read MMS Data in Android?
The only difference is that you dont want to query the content provider for unread messages like i did but for sent messages and include the destination number

Related

Android MMS Content Provider does not store Transaction IDs

I'm developing an app that has a BroadcastReceiver that listens for the WAP_PUSH_RECEIVED_ACTION and then attempts to download the content of the MMS using downloadMultimediaMessage().
However, this only works if the default messaging app (which is not mine) doesn't get to it first, since once the MMS is downloaded, the carrier usually deletes the MMS from its servers.
When this happens, I have to fallback to finding the downloaded MMS in Android's MMS Content Provider. The only reliable piece of information I have to find the MMS I'm looking for, is the Transaction ID I obtained from the WAP_PUSH_RECEIVED_ACTION notification, but for some reason, all Transaction IDs in the content provider are null.
How can I reliably find the MMS in the content provider using only the information I receive in my BroadcastReceiver?

How to get number of unread gmail emails, not unread conversations

I need to get 10 pushed emails using gmail android app. I start sending 10 emails and force android sync to check inbox. After that I get notification about incoming mail. How can I get the number of incoming emails, gmail API provides only NUM_UNREAD_CONVERSATIONS not the number of unread emails in conversation. Maybe there is another way to query gmail content resolver?
So I finally found possible solution, this worked for me:
turn off message threading
Now NUM_UNREAD_CONVERSATIONS flag gives me the number of unread emails

SMS from Android phone with different callback contact name

I have developed an android application which now I want to extend so as it can send text messages.
Most probably I will be able to find documentation on how to send a text message, but what I am looking for is something I don't know how to do a research on it.
There are two types of text messages you can receive.
One type is from a contact you already know, hence you will see the contact name.
Second type is from a contact you don't know. And, depending on the contact, you will either see a mobile number or a name (eg Google).
My goal is to extend my android application to send a text message in a way that the recipient will see a name as sender (eg Google) and not a mobile number.
I cannot extend my application to use 3G to communicate with a server and send the sms through the server nor I can use an online service which is going to send the sms.
I have to either send the text message from the android application directly or send an sms to an sms service to forward the text message to the recipient.
Is this possible to do?

Can I send an Anonymous SMS with Android?

I would like to send SMS (with Android) with an anonymous sender number or a different phone number from the actual sender phone number. (e.g. sender phone number 123, received SMS will show 456)
Is that applicable ? Please attach a small sample code.
You can't do it using the android API itself. You can however use some online SMS sending service.

Can I send a push notification to a phone which I only have its number?

Basically I'm asking about the Client Id - How do I contact someone without having them contact me first?
I believe your requirement implies sending an SMS or MMS. I can't think of any other protocol or standard that uses phone number as destination for the data.

Categories

Resources