I have a question. I must create a program with a service in backgroud, to control inbox emails and if an email comes from a defined address I do something. Can you help me? I don't find any guide to read emails.
You have to query for it. That's fast and supported on every device: ContactsContract (There's even an example)
Related
I have always wanted to be able to have my users send feedback to my email address. Not a problem when using 'createChooser()' with ACTION_SEND type within an Intent. This may lead to a few very rare errors where there is not an application on the user's device to handle that Intent.
My question is: Is it possible to send an anonymous "from" to my developer email account so the User's email will not be required? I know basic HTML, and am wondering if this is possible with a 'form' in a 'WebView' (preferably less complicated) I Do not have a web server or access to one, and am only an individual developer, so that may throw that out of question.
Any insight is greatly appreciated, thank you for reading.
I don't think there is a reasonably easy way to do this with Intents. The best way I can see is have a couple of EditTexts for the message and maybe a title, and then a send Button at the bottom, then sending programmatically with a java class.
See this link for some info on how to do the actual sending part: http://www.developerfusion.com/code/1975/sending-email-using-smtp-and-java/
It's fairly straightforward.
i have been developing an app. It allow call, sms, etc ... from information about contact. Now i want to attach contact via sms,or email. How to do this?? Thank in advance
I guess these can get you started:
SMS
Bluetooth
Email
You should not think that way in Android. It's much more Android's way to "share" things. Look at this link, you will get it : http://sudarmuthu.com/blog/sharing-content-in-android-using-action_send-intent
And when an answer fits your need, feel free to accept it, that's the only way people get rewarded here.
I'm looking for any way to send/read a vCard via SMS in my app. I've read a lot of articles, web-pages, forums etc. There is still not even a clue how to do that.
Here is transaction.
User selects some specific contact
App generates a vCard for it
User types a number to send vCard to
App sends SMS with that vCard(?)
Addressee recievs SMS with vCard and asked to browse contact/add to
contacts(?)
Here is some posts in stackoverflow with the same issue: this and this. Still nothing helpful...
I've found this nice library to work .vcf files(both write and read). But is there any way to send it to another phone (and read properly of course)? Just send this as a string maybe?
HERE is a nice stack post about handling data from recieved SMS sent by SMSManager.sendDataMessage() method
Please help! I'll be happy to get any clue, useful library or a proof that it's impossible on Android. If there is no way via SMS can you give me advice how to do that via MMS?
What's interesting, that there is a lot of apps with that functionality, so I guess this is possible.
Thanks anyone who responds. Have a good day.
You don't have to read MMS from code, when you have system for that.
To send MMS with vCard, you need to attach .vcf file to it.
Here is an answer how to do that.
I'm new to android programming. just to improve my skills, i started with some project in my mind.
when app starts, it will show a button. on click of it, it will allow me to select a contact from the address book. then i want to retrieve all the sms sent to that contact (if they are stored in sms outbox). Is it possible. Can some one guide me. If there is some tutorial on these topics, can you let me know the URL or source code?
Thanks in Advance.
First, it is not possible. There are many SMS clients for Android, many of whom do not expose an "sms outbox".
Second, even if you limit yourself to the SMS application that ships with "Google Experience" phones, the "sms outbox" is not part of the SDK.
If you wish to create an application that sends SMS messages, there is the SmsManager class you can use.
As folks mentioned, the sms outbox is undocument. If you want to access it, you sholud have some skills first.
trace android source code
learn how to use content provider (learn how to create a content provider is better)
what's the authority
know does the URI matched
how to manipulate the Cursor
write some sample code to test
You can find the SMS/MMS content provider here:
https://android.googlesource.com/platform/packages/providers/TelephonyProvider
I was wondering if it is possible to hook into the gmail and email
applications and check to see if it contains text that matches a
regular expression, and if it does, make that text into a link with a
URI that would open my application. What i am thinking of is similar
to how the gmail application can detect a web address or phone number
and make it a link. Is something like this possible?
The Gmail app is closed source and you only have the hooks they give you. AFAIK regular-expression-to-hyperlink-conversion isn't one of them:
Extending Android's Default Gmail/Email Applications
Depending on what you're doing, you might be able to send mail through some kind of gateway which does this work on the message prior to delivery. So rather than emailing johndoe#gmail.com people could write to johndoe#example.com, and the work of translating phrases into URIs could be done at example.com then forwarded to gmail.com with links in place...
But people are link-savvy these days. You can make links plenty readable, for instance look at http://en.wikipedia.org/wiki/URL ...fairly obvious, no magic required and I can enter that even without Google's help.