I have an application on first user's phone which sends a sms to second user.I am abled to send the sms to second user but I want to have a button which can show me the received sms.
Right now I'm having a code from a tutorial http://mobiforge.com/developing/story/sms-messaging-android but it shows the sms immediately after it is received on second user.I want that it is shown only when some particular button like "View sms" is clicked.How can I do it? Any ideas please.
Here is the link of code:
http://pastebin.com/Hu317WNd
You will have to store the message in memory/db/file somewhere and then when the user hits the button you open the file/sql whatever and display the 1st message on the stack.
Listen for button click, get latest message, display.
Can you give some tutorial links for this or some piece of code it'll
be easy then. And one more thing,when that message is retrieved from
file can we have a reply option so that user can reply back to it? If
yes, please explain how? Or tell me how can I change the above
requirement to this one?
I can post some links and you can put them together
Button Click listener Right at the top
Reading and writing to a file This probably isn't the best way, but you could have a comma delimited file that stores the messages that are waiting to get replied to.
The best way would be a database, but since it seems your a beginner start with a file or maybe even shared preferences.
When you read the message in from the file or the db you should have the telephone # data and you can have a reply button present when you display the message.
Going with the tutorial you send, just store the message when it is received in the broadcast listener.
Related
It's possible to have a button in my web page, for sending pre-filled messages to specific number?
i'm trying with
intent://send/+391234567890#Intent;scheme=smsto;package=com.whatsapp;action=android.intent.action.SENDTO;end;whatsapp://send?text=
nothing result.
have a solution? Thanks
Firstly, write the country code without +
Message me in WhatsApp
Sadly this does not work unless the number is already in your contacts list! Making it useless.
Here's what happens for me: I get a modal dialog saying the user is not on WhatsApp and I can either Invite or SMS. This is a mistake - they're DEFINITELY on WhatsApp, but not in my contacts because I've deleted them for testing.
Workaround idea
Offer vCard to save to Contacts
Since the phone number has to be in the Contacts list first, let's get it there. Track the site visitor to see if it's the first time she tapped on Contact me on WhatsApp (a cookie?). If it's the first time she tapped, make the link download your vCard
href="johnsmith.vcf"
The user now has to open the downloaded vCard with the People app, and add you to her Contacts.
Android intents URI FTW
When she returns, assuming she added you, make the button work with the intent:// URI scheme.
href="intent://send/391234567890#Intent;scheme=smsto;package=com.whatsapp;action=android.intent.action.SENDTO;end"
She taps on it and is magically transported to a WhatsApp chat with you.
Keep track of which href to present
Hopefully you can use the cookie you set to track her so you don't have the button offer the vCard AGAIN. There's no other way to know if your number is in her Contacts list unless you ask. But then it's not a button anymore, it's a form.
Same goes for Telegram. Security implications are probably the ones keeping Instant Messaging not so instant.
I need to create an application wherein on a single button click i want to send multiple SMS to a particular number and then capture the delivery reports and store it in the database and show it in my app in a listview. The messages to be sent are physically not typed by the user instead it comes from the database.
How do i acheive this functionality?? Please help!
Thanks in Advance!
Hi my app lets users post/share photos, and comment. App and server communicate via JSON. I'm looking for an effective way to let users know if there are new comments and mark as read after they read them.
I have a comment table on the server, do I add a column with tinyint as 'read' boolean? And how do I automatically set a comment record to true when they are accessed/selected?
Thanks.
Since your app nature shows that you need to save read/unread status on server side (also other desired information). So whenever your server get to know that some User A has posted a comment for some User B you will send a push notification to B telling the app that a new Comment has been posted. When user click the comment to read it just send a notification to server telling him that this comment has been read and server will mark it read in its database. Thatz it
I'm developing an app and one thing I would like to do it allow users to send/share data from the app with others vi MMS or by email. I have been searching but haven't found anywhere to get started on solving the problem.
Basically, I am going to programatically draw the data from an SQLite DB and put it into a delimited file (similar to a .csv) then I want to allow the user to 'export' or send it via MMS or Email. Does anyone have any tips on how I can get my program to open the messaging application and add the attachment at the users direction? Really just need some beginning info so I have a place to start.
Here is what you are looking for. This should be a good start
launch sms application with an intent
I want to write an application to List the Gmail message. In the list, if user click one of the message item, it shall link ot Gmail App to see more detial information. Currently I can read the Gmail db with Gmail.java.
There are some problems while I want to open Gmail Activity. In general, we can open Activity with Action and parameters. But Gmail App has not release code base. We do not know what Action set to Gmail Activity and what parmeter shall we put the extras. I only know that the Activity of View detial Message is named "HtmlConversationActivity." And the Package is under "com.google.android.gm."
Please tell me how to open the View detial Message Activity in Gmail APP.
thanks a lot.
You'll probably find this link useful: Start remote activity
My guess is that you'll need to pass some data to the other activity...
And if it doesn't sound too much like begging you could look at this (How to get number of unread gmail mails) to see if we can help each other :)