Android : Get Postal Address From Contact Using ContactsContract Api On Droid?
Aug 31, 2010
I am using ContactsContract api intent for showing all contacts from an activity. This intent returns an id of the contact. I need to get the postal address of this contact.
Here is the code which i am using for showing contacts:
Intent intent = new Intent(Intent.ACTION_PICK);
intent.setType(ContactsContract.Contacts.CONTENT_TYPE);
startActivityForResult(intent, PICK_CONTACT);
I am getting the result in the onActivityResult function..
View 2 Replies
May 18, 2009
I try to find the postal address of a contact witch is saved in the phonebook. I know the name of this contact, but i don't know where i can find his postal address.
View 2 Replies
View Related
Dec 5, 2009
Is there a way to get the data: address, postalcode, country ect. in different country formats.
Like in Great Britain:[recipient][street name][postal town (town/city)][postal code[country name]
And in The Netherlands: [recipient] [street name] [postal code] [postal town (town/city)] [country name]
I now use the ContactsContract from Android 2.0.1 and tried the ContactsContract.CommonDataKinds.StructuredPostal.DATA1 (FORMATTED_ADDRESS). But this seems to give the data as follows (no matter what country settings): [street name] [postal town (town/city)] [postal code].
View 2 Replies
View Related
Aug 11, 2010
Sorry for the really dumb question but is there any way to view a contacts postal address without editing that contact? (I mean view the actual address so you can write it down onto an envelope not view it's location on a map).
Using sim free HTC Legend (not rooted or anything).
View 4 Replies
View Related
Sep 30, 2010
I've been using the ContactsContract api for some time now and I've come across two "columns" listed in the API page for ContactsContract.Contacts that do not appear to actually be assessable.
CODE:.....
By my reading of the API these two values would seem to connect to the Structured Name (in DATA) used to construct the display name for the given contact. Having access to this directly from the contact table would be incredibly useful to me at the moment, but as far as I can tell they are not actually in the working api (I've tested against both 2.1 and 2.2).
The associated constants do not exist in the Contacts object, and attempting to access the fields directly (by using the lower case string versions I've seen in code dumps online) turns up with an sql error -- invalid column, as you might expect.
Has anyone had any better luck with accessing these? Are these actually in the API?
I did some more checking and here's some related values from RawContacts that are listed on the API but appear to not actually be in it: DISPLAY_NAME_ALTERNATIVE, DISPLAY_NAME_PRIMARY, DISPLAY_NAME_SOURCE, PHONETIC_NAME, PHONETIC_NAME_STYLE, SORT_KEY_ALTERNATIVE, and SORT_KEY_PRIMARY.
All of these appear to be features not yet in the API that are mistakenly not filtered out when the javadoc was released. If other folks are unable to access these features as well it might be worth filing a bug report over.
View 1 Replies
View Related
Jul 26, 2010
Need some info on ContactsContract.RawContacts<http://developer.android.com/reference/android/provider/ContactsContr...> :
A row in the ContactsContract.RawContacts<[url] represents a set of data describing a person and associated with a single account (for example, one of the user's Gmail accounts).
I have found two entry for each contact get inserted when I do import contact from SIM card. Why it is so and is it right?
When I am trying to modify entry, compare function from EditContactActivity.java get called. /packages/apps/Contacts/src/com/android/contacts/ui/EditContactActivity.java
In this class in compare function checking accountType which is getting null. Wanted to know with which raw contact this comparison is happening ? and Why it is getting crashed ?
View 2 Replies
View Related
Nov 1, 2010
How to identify a contact item in Android address book ?
I am developing an application to add, delete and update contacts on Android PDAs, I can't think up a good way to identify a contact item in the Contact(address book) taking the following issues into consideration:
1. different people can have the same name.
2. Though a record can be identified by its _ID (eg: Phones._ID), serveral rows may belong to one specific person.
I am going to teat all the information(name, display name, phone number .....) of one person as a whole. Do you have a good way to identify them ? Or, How could I find the connection among the properties of the same person?
View 2 Replies
View Related
Feb 22, 2010
I recieve a text message from a friend that has their address in it, and I want to add this address to their contact. How do i go about doing this. I have tried to figure out how to select(highlight/copy) text in a SMS but have not found a way.
View 1 Replies
View Related
Dec 8, 2009
My app had in intent-filter to respond when users click on a person's address in the contacts application.
In Android 1.5 I would get an intent with data like content://contacts/people/16/contact_methods/3
In order to retrive the address from the contact I would later I would do:
Cursor c = getContentResolver().query(intentUri, ...);
Get the column called "data" and take the address from there.
That stopped working on later android releases. On 2.0 all I get is:
content://com.android.contacts/data/4
And I do not know how to get the address form that. It fails when I query for it
View 4 Replies
View Related
Aug 18, 2010
I am trying to update contact email address using this code I am getting "Id" using this code My questions are
1) Am I using correct way for getting Contact_ID using Phone number?
2) Contacts are not updating correctly, it is changing all fields like email, name and number.Am I doing some thing wrong?
View 2 Replies
View Related
Jan 5, 2010
I am able to get the contact cursor using the following...
View 1 Replies
View Related
Jan 19, 2010
Android:how do i retrieve the contact photo,name,number from the address book and display it using a list view
View 2 Replies
View Related
Apr 21, 2010
I have a application which will retrieve all the contact details and will display all the available Contact Names in a SimpleCursorAdapter. so once user select a particular name number will be displayed. which works fine. but now i want to display HOME and WORK numbers if available. how can i achieve this?
View 2 Replies
View Related
Apr 26, 2012
With Google's voice action (or voice search), I can use the "navigate to" command to start the navigation app directly. However, this seems to work only with address, name of places.For example, I tried "navigate to 1234 main street" or "navigate to san jose airport" or "navigate to Starbucks on oakland road". The commands were recognized in all cases. For the last one, it prompted me with a list of choices for the end points, and once selected, proceeded correctly with the navigation.
However, if I say "navigate to John Doe home", although it also recognized the command correctly (i.e. it came up with the prompt "navigate to john doe home" and asked me to choose "go" or "cancel"), it would not come up with the correct address from the contact list as the end point to navigate to, but instead it would come up with a list of end points not related to John Doe at all, even if I have John Doe in my contact list (with the home address).
I googled around and it appeared that other users have also experienced similar problems, with some dating back 2-3 years ago. I just discovered this since I just switched from iPhone to a Samsung Skyrocket (with Gingerbread v2.3.6). Seems to be a simple problem to resolve. I can't believe that this problem is not (AFAIK) getting the attention of Google as I think this would be encountered by a lot of people.
Also I am wondering if there is a way to get around this beside giving the full address in the voice search command.
View 2 Replies
View Related
May 28, 2010
I haven't seen any docs on using the new ContactsContract API. Can someone please direct me to an example/explanation of using it?
View 1 Replies
View Related
May 6, 2010
Is there a way to somehow link a contact's address to a calendar event? For instance, if I have a meeting at Joe Bob's office, I'd like to be able to type in Joe Bob's name in the event location field on the calendar and have it insert the address for me, instead of having to switch to contacts, find Joe Bob, copy Joe Bob's address, switch back to calendar, and paste the address.
View 2 Replies
View Related
Oct 25, 2010
I have had the SGS for a few days.
It must be possible to add more than one number to a contact, but I can't find it.
I thought that Samsung would have a better manual on the net, but I can't find that either.
Any ideas?
View 2 Replies
View Related
Feb 6, 2010
Isn't there a way once you get an address from Sprint Nav that there was an option to add the address into the HTC contact list? I know I have done it before but it is escaping me right now.
View 2 Replies
View Related
Mar 31, 2012
How can i change the default application for the use of the contact address in cm7?
If i touch the adress, then maps Starts. I want to start an other app. How Can i change IT?
View 1 Replies
View Related
Apr 21, 2010
adding new contacts in address book and apply them in batch by using new ContactsContract API. I could not find a proper tutorial on this. I am able to add a single contact. But batch update fails with Unknown contacts being added. Currently I am looping through while loop while collecting info. of users to write, store it in the ArrayList and applying and ContentProviderResult[] result = getContentResolver().applyBatch(ContactsContract.AUTHORITY, op_list); But only one contact is updated with name and other are updated as unknown contacts. Please help with a sample code which adds the fields like name,nickname,mobile,title,email,skype id,work-country etc.
View 3 Replies
View Related
Oct 24, 2009
Does anybody have any sample code to access/get the postal addressed of a contact using Contact API? I searched the sdk doc but did not find enough info to do this.
View 2 Replies
View Related
Jul 26, 2010
When viewing an individual contact in People (Contacts, Address Book equiv.) the single address field contains the street, city, state and zip. (The Google Contacts, which is the source for the 'People' is also a single field for street, city ,state, zip.) The latter part of the field (zip, state and sometimes city), does not show up without clicking on the address, loading the map (with GPS running) and then clicking on the address balloon in the map.Is there an easier way that I should be doing this to read the entire address for a contact?
View 3 Replies
View Related
Sep 24, 2010
I recently loaded Baked Snack 1.7 on my phone as my first custom ROM - before that I had rooted stock Froyo. I tried two Baked Snack kernels and now have KingsxKlick bfs #9.
So I have all these variables and now I have a weird problem - my address book is force-closing on me every time I try to create a new contact. I haven't created a new contact in awhile, so I have no idea whether this could be related to my new ROM or kernel, or if it's a problem with the address book itself. I have had no other problems since installing the ROM and kernel.
I can input the new number for the contact, but when I try to name the contact it says it has encountered an error and needs to stop. This is the stock HTC People app, and I have tried it creating the contact as a regular phone contact and as a Google contact. No dice.
I've also tried a battery pull, clearing cache, the basics.
Any thoughts, guys? I met a cute boy and I REALLY need to save his number.
View 23 Replies
View Related
Aug 10, 2010
I am new to android (never owned one before), and will be getting my first android device soon. I have one gmail account, another mail account with google apps and a yahoo mail account, so my contacts are spread around. So I made a separate gmail account just so that I could fetch all contacts at one place and delete the ones I dont need, and then do selective contact sync with android device. I will also use this account to back up my SMS's and any other kind of data that can be backed up in cloud.
I wanted to ask you guys when setting up the device, should I use my newly created gmail account as primary account or the one that I am using on daily basis?? My main concern is that once I bought apps with one account, I wont be able to use another account again later, so I want to get it right from the start. Also, can android still use calender and email from my other gmail accounts as primary calender/email??
View 3 Replies
View Related
Oct 11, 2012
i'm looking for an port of Postal 2 and Soldier of Fortune. Does that exist? Or is there an other way to play these games on Android?
View 1 Replies
View Related
May 18, 2010
Does anybody know a program or app that i can sync my contact photos from my phone address book to my gmail or even outlook address book... with blackberry i could sync it to outlook then to gmail, but with the INC i have not found a solution.
View 9 Replies
View Related
Jul 15, 2010
What is the .git file corresponding to ContactsContract.QuickContact class?
View 2 Replies
View Related
Oct 16, 2009
My address book is all over the place! I am coming from a BB curve 3300, i had my contact list with numbers and emails within same field per person. When the address book was transfered over to my Hero, i received 3 to 4 different fields per person! How can i fix tihs without having to manually go in and delete 3 of the 4 fields and enter email, cell numbers to one of the contact?
View 6 Replies
View Related
Nov 12, 2010
Address Book Issue:
Suddenly after having it worked smooth for 3-4 days, I started getting a very strange problem which I was not able to search anywhere in forums or in the help manual.My address book search is not searching any contacts by the contact's names. It is just searching the emails, it's a huge problem for me especially when trying to send SMS to anyone, I can't go and add recipient by searching, I need to scroll the whole way down to that contact, which is irritating.
Otherwise the phone is quite nice and I am liking it very much. Especially the slide out keyboard is really usable plus unlike most smartphones, it's really small in size and performs most functions. There are some minor flaws but most of them are going to get fixed with the SE's much awaited software update for bringing in the Android 2.1, no doubt I am also waiting desperately.
View 5 Replies
View Related
Jan 23, 2013
I like to add addresses to my phone book in Android. As a lot of my contacts live in buildings i also like to add the floor and apartment number to the address: Looking like that:
Street and Number, Floor and Department number
Town, zip code
State
Country
Example;
Av. Whatever 12345, Floor 5-A
Buenos Aires 1007
Argentina
When clicking on the address the GPS of my wish opens , finds the country, city but not the street because of the additional Floor and department information. Without this additional information everything well with Google Maps or Sygic.
So, how should i add this additional Floor and department information to my address without the GPS has problems to find the main location.Also from ICS on there is only one filed to add the whole address not as with Gingerbread where you had a field for street, city, etc.
View 1 Replies
View Related