Android | Whatsapp - read last message - android

Lets say that I need the last message that sent to whatsapp app and I need to be able to read this message from my application. (TTS).
I know how to send message to Whatsapp from my app but not writing message from my app and send to Whatsapp with specific contact name.
Edit:
How can I read the last message that sent from contact in Whatsapp? I want to take the string of the last message and use it in my app.
Thank you guys.

Related

How to present sent and received SMS in single ListView in android

I am developing an android SMS application. I can send and receive SMS through my application. I want to show SMS in single listview. I want to know that whether an SMS is
"Sent SMS" or "Received SMS" . How can i check this?? Then update listview SMS as in chat.
Any idea ,tutorial,code snippet will be appreciated.
If you're querying sms contents by query, you could use type column to determine if the sms is sent.
Found in another stackoverflow response, you could look here to see how they do it:
http://gbandroid.googlecode.com/svn-history/r46/trunk/MobileSpy/src/org/ddth/android/monitor/observer/AndroidSmsWatcher.java

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?

How to Recognise that which message has sent in android?

Sorry for any mistake!
I am developing an App in android in which I am access unread message from the mobile with the help of Content Resolver & Sending those message on Email automatically. I am using TimerTask for this which repeate my Application with in a specific Time which I have set. Now it again Pickup those message which I have send On Email. Now problem is that How to recognise which message i have send in android?
Any help will be appreciated.
Thanks & Regards,
Deepanker Chaudhary
There are a few solutions to this:
Store the timestamp/id of the last SMS successfully forwarded through the email in a SharedPreferences value.
Maintain a database internal to your application and store all the messages forwarded to email along with their sending status in this database, so that you can resend the message in case of error in sending the email. You may have to perform housekeeping of this database to occasionally clear out past entries.

Send Email or SMS based on the contact picked

I am trying to develop an app, where one of the requirement is to send email or SMS to the contact which the user picks. When the user needs to send message, they can pick the contact from the contact list. If the user selects the "phone number" of the contact, I need to start SMS application and insert my message contact. If the user selects the contact email address from the contact list, I need to open the EMail application with my content in Subject and body.
How do the application know about the user input??
I am not an expert on this topic but it is interesting to me so I have done some reading about it.
You have the action of selecting a phone number or email address right? So if the user selects a phone number you can use SmsManager for that (here is an article about it http://mobiforge.com/developing/story/sms-messaging-android ). And a related Stack Overflow article discusses sending emails on the Android platform and one user gives a very nice Java example of doing this. Here is the article: Sending Email in Android using JavaMail API without using the default/built-in app
I hope these might be of some help!

Android show SMS in inbox from some other resource

Well!! My question is little weird .. I have created an chat channel which send text using one XMPP server.. Now I want to show the incoming chat as a sms in inbox.. Is there a way I can send sms/show sms in message inbox of android phone?
what I want to achieve is that if a person A sends an SMS to person B (then I will intercept the out going SMS and send it via chat)
Waiting for the comments!
Thanks
You can use Twilio to manage the SMS functionality.

Categories

Resources