Android :: How To Access Email Addresses In Application?

Mar 17, 2010

I have the following code through which I am able to retrieve phone numbers. Somehow, I am not able to retrieve email addresses by using android.provider.Contacts.People API.

import android.app.AlertDialog;
import android.app.ExpandableListActivity;
import android.content.ContentUris;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.provider.Contacts.People;
import android.view.View;
import android.widget.ExpandableListAdapter;
import android.widget.SimpleCursorTreeAdapter;
import android.widget.TextView;
import android.widget.ExpandableListView.OnChildClickListener;

public class ShowContacts extends ExpandableListActivity implements OnChildClickListener { private int mGroupIdColumnIndex;
private String mPhoneNumberProjection[] = new String[] { People.Phones._ID, People.NUMBER // CHANGE HERE }; private ExpandableListAdapter mAdapter;
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
// Query for people Cursor groupCursor = managedQuery(People.CONTENT_URI,
new String[] {People._ID, People.NAME}, null, null, null);
// Cache the ID column index mGroupIdColumnIndex = groupCursor.getColumnIndexOrThrow(People._ID);
// Set up our adapter mAdapter = new MyExpandableListAdapter(groupCursor, this,
android.R.layout.simple_expandable_list_item_1,
android.R.layout.simple_expandable_list_item_1,
new String[] {People.NAME}, // Name for group layouts
new int[] {android.R.id.text1},
new String[] {People.NUMBER}, // AND CHANGE HERE
new int[] {android.R.id.text1});
setListAdapter(mAdapter); }
public class MyExpandableListAdapter extends SimpleCursorTreeAdapter {
public MyExpandableListAdapter(Cursor cursor, Context context, int groupLayout,
int childLayout, String[] groupFrom, int[] groupTo, String[] childrenFrom,
int[] childrenTo) { super(context, cursor, groupLayout, groupFrom, groupTo, childLayout, childrenFrom, childrenTo);
} @Override protected Cursor getChildrenCursor(Cursor groupCursor) {
// Given the group, we return a cursor for all the children within that group
// Return a cursor that points to this contact's phone numbers
Uri.Builder builder = People.CONTENT_URI.buildUpon();
ContentUris.appendId(builder, groupCursor.getLong(mGroupIdColumnIndex));
builder.appendEncodedPath(People.Phones.CONTENT_DIRECTORY);
Uri phoneNumbersUri = builder.build();
return managedQuery(phoneNumbersUri, mPhoneNumberProjection, null, null, null);
} } @Override public boolean onChildClick(android.widget.ExpandableListView parent,
View v, int groupPosition, int childPosition, long id) {
AlertDialog dialog = new AlertDialog.Builder(ShowContacts.this)
.setMessage(((TextView) v).getText().toString())
.setPositiveButton("OK", null).create();
dialog.show(); return true; } }

Android :: How to Access Email Addresses in Application?


Android :: Accessing Email Addresses

Mar 17, 2010

I have the following code through which i am able to retrieve phone numbers. Somehow , i am not able to retrieve email addresses by using android.provider.Contacts.People API. import android.app.AlertDialog; import android.app.ExpandableListActivity; import android.content.ContentUris; import android.content.Context; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.provider.Contacts.People; import android.view.View; import android.widget.ExpandableListAdapter; import android.widget.SimpleCursorTreeAdapter; import android.widget.TextView; import android.widget.ExpandableListView. OnChildClickListener;

View 2 Replies View Related

Android : When On G1 How To Bring Up Email Addresses

Nov 9, 2008

I am ready to throw this phone out the window if somebody isn't able to help me! T-Mobile Tech support suck they have no clue and told me they have no clue and sorry! Well here goes!

I set up my gmail account and I imported my contacts from aol into my gmail account now I have no idea when I am on the G1 how to bring up my email addresses if i want to email.

View 3 Replies View Related

Android :: How To Get Access To Accounts Configured In Email Application?

Oct 4, 2010

I'd like to get access to the data stored in the default Email app. I'd like to find out what accounts are associated with the App, and for each account, what folders are associated with the account, and for each folder how many emails are in that folder. I need this information on 2.1 and 1.5. I see the AccountManager in 2.1 can give me some of the accounts configured, but in the Email app you can also add accounts which don't show up in the AccountManager. How do you get access to the accounts configured in the Email app. I'd like to be able to programmatically deleted emails in the users folders. Are the emails stored in a content Provider? If so whats the URI.

View 4 Replies View Related

Android :: Accessing Contact Email Addresses

Mar 18, 2009

Post subject: Accessing contact' email addresses Hi! I'm developing an application in which I need to display user a list of contacts and their email addresses so that user can choose one of them. I've got some help from Internet and I'm able to display a list of contacts and their number by the following code

View 2 Replies View Related

General :: How To Set Up K9 Email For 2 Email Addresses

Nov 22, 2013

I have several different email addresses, and would like to be able to read them with K9. I have set up to receive my main email address, and can I set it up to fetch from the other addresses?

View 1 Replies View Related

Android :: How To Get List Of Email Addresses From Contacts For Autocomplete Field?

Aug 10, 2010

Ive read through the docs and searched on here, but I'm not quite understanding how all the pieces fit together. Was wondering if anyone has a clear explanation of how to grab a single column of data from Contacts and have it populate an autocomplete box.

View 2 Replies View Related

HTC Incredible :: How To Clear Recent Email Addresses?

Jun 3, 2010

searched for this post and found this post a few times, but no answer. This if for the D-Inc btw, I emailed the wrong people a few times. for example i used JSmith@aol.com, instead of JSmith@yahoo.com, now whenever i try to email JSmith, i'm getting both AOL and YAHOO emails under recent history for email addresses. Is there a way to clear that ? it's getting very very annoying and i don't see a place to clear recent email history on the droid, anyone have any idea about that? Also, this is a 2 part question, how do we clear search history from google maps? I've tried to go to the app settings, but there is no clear cache, or clear data, and i've tried to go to security, privacy, and cleared data there, but when i search on Google maps, all the recent searches come up, which is not good when people can see where i've been

View 10 Replies View Related

HTC Hero :: How To Set Multiple Email Addresses On Phone?

Aug 26, 2009

I use G mail and have my 5 email accounts running through it. I can compose and email and "select" which email account to send it from within G mail. However, in Android on an HTC Magic, you cannot select which account to send "from", you can only send from the g mail account (in the g mail app). Yes, I know you can configure each one with an I MAP account, but I don't want that. I use G mail to store everything. So my question to existing HTC Hero users is: In the G mail application on a HTC Hero can you send from multiple email addresses?

View 5 Replies View Related

Sprint HTC Hero :: Connectivity / No Application Access And Cannot Check Email

Jun 24, 2010

After rooting my Hero the night it came out, I noticed that I'm having connectivity issues. Weather won't update, can't check email, can't access facebook, etc. How to put my phone back to normal?

View 3 Replies View Related

Motorola Droid X :: All Sent Email Addresses Showing Up In Contacts?

Jul 27, 2010

I am a new droid user, coming from bberry tour. Want to love the X and it is slowly growing on me. I am using an activesync account with for my work email which syns calendar/contacts/email. For some reason every email address that i have ever sent an email to shows up as a contact.anyone else seen this or know how to resolve? all of my contacts are in there that i want but there are an additional 500+ "contacts" that are just email addresses that i have sent to through work.

View 5 Replies View Related

Samsung Fascinate :: Delete Stray Email Addresses

Nov 7, 2010

So I have a few stray email addresses that came over from gmail say with a dot between names that shouldn't be there. How can I delete an email address from a contact or preferably off the phone entirely? Fascinate running stock tw if that matters.

View 1 Replies View Related

Sprint HTC Hero :: Does Anyone Know How To Sync Yahoo Email Addresses

Dec 18, 2009

I am trying to find out how to sync my addresses from yahoo to my address book in my contacts.

View 12 Replies View Related

Sprint HTC Hero :: Deleting History Of My Email Addresses?

Feb 25, 2010

This might sound strange but I want to delete the history of my email addresses on my hero, I'm selling something on craigslist and when I reply to them from my computer or whatever it shows up on my phone and I'm like who the H3ll is this??? and then it dawns on me that it's someone I emailed about the POS Pre I'm selling
If that didn't make sense, basically when I go to shoot an email on my hero, as I'm typing who I'm sending it to, it shows a list of everyone that I've emailed starting with whatever letter I'm pressing, normally and most of the time that's awesome, but sometimes, like the situation I stated above it's a big pain in the arse.

View 1 Replies View Related

HTC Desire :: HTC Sync Corrupting Email Addresses In Outlook 2010

Sep 14, 2010

I have a HTC Desire (updated to Froyo) and have been syncing my contacts with my Outlook 2010 (running Windows 7 Enterprise-32 bit). Everything seems to synchronize well but somehow the "email address-Display As" fields gets updated in outlook, which then doesnt allow me to send emails to those email addresses unless I manually go and update the display as field inside my outlook contacts. I have manually updated all the contacts once already hoping that it may not be due to HTC Sync but when I did the sync then immediately all my Outlook email ids got updated.

Now everytime I try and send an email I immediately get Undeliverable receipt from System Administrator stating the following:
Your message did not reach some or all of the intended recipients.
Subject: test Sent: 14-Sep-2010 17:41
The following recipient(s) cannot be reached: abc@xyz.com on 14-Sep-2010 17:41
None of your e-mail accounts could send to this recipient.

View 36 Replies View Related

General :: How To Eliminate Suggested Email Addresses In Yahoo Mail

Jan 21, 2014

I use the Yahoo mail android app (as well as gmail). When I create an email in the app and "click" in the "to" field and type a letter I get a whole raft of email address suggestions that are not in the contacts. I've looked in my phone contacts and they aren't there. I've looked at Yahoo mail settings and see nothing there. I've gone to the desktop Yahoo mail an tried looking in contacts there and they don't show up. Many of these are addresses of people that I recognize and have probably either sent or received an email from them but certainly never saved them as a contact. I tried long pressing on the suggested address and it highlights it but no options are given. It doesn't happen in my gmail. I've gone to URL...contacts and they don't show up there. I know I should just switch to gmail only but this is an old address that I want to keep active. I have a Moto X with Kitkat. This has followed me from phone to phone.

View 1 Replies View Related

General :: How To Send Email To Single User With Multiple Addresses

Feb 8, 2012

I just got a Samsung Skyrocket on AT&T. It's running 2.3.5. I love the phone but have one question:

When sending an email, NOT Gmail, and I select the recipient from my contacts, it automatically picks up the default email address that was selected for that contact within the contact manager. Several of my contacts have more than one email address and I need to be able to choose which address to send to. The thing is, I see no option to do so when selecting the contact in the email message. The only way around this that I can see is to have separate contact entries for each email address. That would mean I could have four or more contact entries for each person. Totally not acceptable.

So, am I missing something here? Is there a way to select which email address you want to send to when creating a message? Or do I have to go in and change the default email address within the contact before I compose my emails?

View 2 Replies View Related

General :: Syncing Samsung S3 Contacts To Gmail - Only Email Addresses Show

Jan 28, 2013

I see my phone contacts have synched with my gmail contacts, which is good. Except that only the email addresses are visible. Not the phone numbers. I have checked on the Accounts and Sync settings for the gmail - and it is set to transfer all (all boxes are ticked).

View 1 Replies View Related

HTC Incredible :: Sync Facebook Contacts Without Doubling Numbers / Adding Email Addresses

Sep 18, 2010

So when I open a contac it has 2 number, the one from facebook and the one I already has. Also I dont want the email either, so basically just the picture.

View 3 Replies View Related

Jelly Bean :: Galaxy S3 - Stock Email Client Autofill Addresses / How To Edit

Jan 2, 2014

I have had my phone nearly a year and how it's got a cache of people I've sent emails to, because sometimes I want to retrieve an address I didn't think I'd need again... However, it also presents some annoying issues. It also saves every typoed address I've ever fat-fingered, and sometimes it comes up as the first choice when it was for someone in my contacts, and I then send a message to a bad address. If you go to write an email and press that little 'contact' button in the "To" field area, it shows me a list, and I don't know where some of those are coming from - it's some but not all of my contacts and some but not all of the addresses I've ever written to. I would like to clean out the fat-finger errors and also that mysterious list that comes up when you press the little contact icon when composing an email, without taking a scorched-earth approach. Googling around indicates to me that this has annoyed people for years and nobody's found a solution.

I have a Galaxy S3 running the recent update to 4.3.

View 2 Replies View Related

Jelly Bean :: Deleting Previous Email Addresses On Nexus 10 When Forwarding Emails

Feb 12, 2014

How to delete a previous email address before forwarding an email on,

View 4 Replies View Related

HTC Hero :: People Application And Truncated Addresses

Dec 11, 2009

On my Hero I have synchronised people's details to the 'People' application from my desktop Outlook using both the HTC sync and Companionlink. But either way, I just seem to get a truncated version of their physical addresses under the 'Find Home' field. When I hit that, I get a map I'm not looking for, and sometimes the full address, sometimes not. I can't see any other way of accessing the full address on the Hero - what am I missing?

View 2 Replies View Related

Android : How To Send An Email From My Application Using Email Application

Nov 26, 2009

How to send an email from my application using email application?

I am having the one scenario like send email to particular mail id(info@jeltech.com). In my application while clicking the link it should call email application and then need to pass above mail id to in "To" box (after login) .

View 2 Replies View Related

Motorola Droid :: Different Outlook - Error - Application Email - Processcom.android.email - Has Stopped Unexpectedly

Jan 5, 2010

I am having no problems syncing with Outlook. My problem is that when I click on an email it never opens up the email. Instead I get a force close. The error I get says, Sorry! The application Email (processcom.android.email) has stopped unexpectedly. Please try again.

View 2 Replies View Related

Android :: Develop An Application Pluging / That Could Access Application Sqlite

Nov 15, 2010

I want to add a big feature to an application i am developping, but as this feature interest few people and is quite independant from the main part, I would like to put that in a seperate "plugin" application.Does anyone knows any design patterns, snippets, "reference" examples about such design?In particular that separate plugin application should be able to access some tables in the main application DB. Is it possible to do that without broadcast receiver? - the main application uses a TabActivity: is it possible that a the tabactivity instanciates an Intent Activity that is part of the plugin? - does the plugin can access main application preferences (not sure this would be necessary, but better to anticipate the question!) is it possible from the plugin to access main applications ressources?At least the 2 first points are mandatory for me.

View 4 Replies View Related

Android :: Good Email Application For Optonline Email

Oct 20, 2010

I need a good email app for my optonline email. I have been using K9 mail which is great but for some reason it won't set up the outgoing mail correctly. It keeps giving me an error message. So I was thinking I would try something different.

View 4 Replies View Related

General :: Reply All Settings On Email Application - Getting Email Back To Me Again?

Nov 9, 2012

I am in the CC section of the original email I get the email back to me again. Is there anyway to stop this from happening? In IOS that doesn't happen when I reply to all it doesn't come back to me again.

View 3 Replies View Related

Android :: Can't Access Yahoo Email / How To Fix?

Jun 13, 2010

Today for some reason, I can't access my Yahoo! email. I've been reading and replying fine until now. I don't know if I accidentally changed a preference or what but if I did, can someone help me set it back. The pop-up message I get now when I try to open a message in Yahoo! email says "complete action using..." and gives me the option to "compose" or "mail". I've tried both but "compose" starts a new mail message to verizon wireless, and clicking on "mail" takes me to a new screen asking me to "Choose a mail provider".

View 1 Replies View Related

Android :: Access Or Read Email Programatically

Mar 29, 2009

Is there a way to read/access emails or inbox in Android programatically.

View 1 Replies View Related

Android :: APIs To Access Email Accounts Or SMS / MMS Messages

May 24, 2010

Does anyone know if there is an API available to access all SMS messages as well as emails in the inbox? You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@google groups.com To unsubscribe from this group, send email to android-developers+unsubscribe @googlegroups.com For more options, visit this group at http://groups.google .com/group/ android -developers?hl=en

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved