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 :)
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 Want to open a site from an app and pass data from that app to that website.Like if we open google page from my app,the searching word should be passed from the app which is nothing but auto-filling.Can anybody please suggest
Thanks,in advance
Use Intent to pass data from one app to an another app.
Go through this http://developer.android.com/reference/android/content/Intent.html link for more info.
In your case, i guess implicit intents would be a better choice.
Specifically, is it possible for me to override the email view in gmail, so that when the user clicks on an email in their inbox it will ask them whether they want to open the email in gmail or my app?
It depends on how the gmail app opens the email. It looks to me like it gets opened in a fragment, but you can check the source. Check here how to get it. I think the gmail app source should be included. If they open it in a separate Activity with an IntentFilter, then you can register your own activity for it. I think your chances are not that good, though...
Yes it is, you just need to find the right category to
add in manifest besides LAUNCHER and MAIN.
It could be Catergory.EMAIL, but do not know.
Would like to search it for you but am currently on my phone which isnt suited for googling around.
Edit:
Nevermimd, misread your question :-)
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.
I posted this query here, but as usual, noone knows / no replies
http://www.anddev.org/viewtopic.php?p=41513#41513
How can I launch the android default mail application through the click of a button in my code?
I would also like to know, how this can be done to launch the contacts list also.
Any help in this regard is appreciated,
Regards,
Rony
How can I launch the android default mail application through the click of a button in my code?
Use an ACTION_SEND Intent.
(BTW, I apologize for the formatting of that blog post -- AndroidGuys keeps changing hosting providers, which screws up my posts)
I would also like to know, how this can be done to launch the contacts list also.
Use an ACTION_PICK Intent.