View / Edit Contact on Android - android

I am trying to add these functionality in my Android app:
1) Get A list of suggested contacts from a Web Service and Display them in a list view
- This I have implemented and working fine
2) When User selects any of these contacts I want to present them in Native Contact View. My fried who is iPhone developer was able to do this with help of ABPerson class which provides feature to display the contact in native contact view page without adding the contact to contact list. I am not able to find any such API in Andoid. Please suggest.
3) When User want to edit any contact in the above list, I am able to present Edit Contact activity from native Phone Book app. This is working fine, but I am not able to remove the Done and Revert button. Unfortunately due to this, if user click on Done that contact is added to phone, however, what I want to do here is that, user can modify the data and I will keep it in the memory till the export process starts. During the export process I will insert these records in the Phone Book.
Please suggest me how can I do this.

I would advise you look over the BusinessCard sample and ContactManager sample posted on the Android developer site.
Reading carefully through both of these is what helped me understand exactly what's going on in the contacts API.

Related

Integrate my app which contacts manager

I want to display my app's icon in the contact info as a shortcut. The same way as google+, fb, whatsapp does.
I found this question: Display the app icon if the contact is associated with the application in phone address book
And its very similar to what I want to do, but using Apache Cordova. Any ideas how can i do it?
I tried adding my app deeplink in contacts IMS using the contacts plugin, but no success so far.
Maybe this will help a bit. Give it a try!
This module is on my to-do list but i've kept it aside for a while...
I'll post if i'm able to do it. Please do the same!

Control default contact list and messages app

Is there a way I can control what contact list and messages show? I want to make an app that if enabled will hide certain contacts or messages from certain people. I am not sure of this is doable
Please let me know if this can be done programmatically. Please note that I am referring to the default contact/messages APP that comes with android and I want to be able to control what it shows from my app
Thank you
Please note that I am referring to the default contact/messages APP that comes with android and I want to be able to control what it shows from my app
Fortunately, this is not possible, except by modifying the actual data, as noted in a comment on your question. You cannot hack into other apps like some script kiddie.
Note that, due to synchronization, deleting contacts may wind up deleting them from an upstream data source. The user may not appreciate this.
You are welcome to build your own contact app that maintains its own filtered list of contacts.

Filter out Facebook Contacts from the Contact Picker

I have a contact picker in my application that keeps crashing when a facebook contact is selected. I won't have the code I'm using to open the picker in front of me, but I believe I'm accessing the contacts through a call similar to this:
new Intent(Intent.ACTION_PICK, People.CONTENT_URI)
Does anyone have experience with this?
i wish i had an answer for you but i posted 2 similar questions without any good answers. seems like a totally reasonable question and easy to do in most other dev environments (im actually a c# developer) but android has got me stuck on this. i think i may just have to write my "own contact picker" so that i can test for the fact that the contact has a number before adding them to the picker list programmatically.
anyways, my questions are here:
How do get the android sdk contact picker to give me just phone results and not all my twitter followers
how do i get startActivityForResult() to bring up just a list of telephone contacts (like when i click on the "People" icon) using the android sdk?
in my app i am testing that the phone gets returned from the picked contact before trying to send it a message (so mine doesnt crash), but i dont want the user to have to see a "that contact doesnt have a number" message if they dont have to.
i found this too:
http://mobile.dzone.com/news/contacts-api-20-and-above
while it DOESNT show you how to filter the contact list, it does show how to programmatically create a list that has only contacts with numbers. write back on my questions if you find anything that could be useful, thanks!

Add a contact to android emulator

My issue is quite simple I think :
I would like to be able to add a contact to the contact list by a simple click on a button (and be able to test it on the emulator). The data of this contact would be stored in the source code of the application.
is there an easy way of doing that?
thank you for your answers
The only easy way to insert a contact is to use an INSERT action, where you supply some of the data and start up an activity for the user to provide the rest and confirm adding it to the contacts list. Here is a sample project demonstrating this.

Contact Detail syncing between people app and my app

I am involved in a project which has the functionality like whatsapp does for contacts.My app have to get the contact from phone(ie Peoples app) and sync it to server to find the users who are all already involved in my app.If a user not involved already i need to place a invite button.
For sync there is no problem i implemented a sync adapter,I have to get the updates like new phone no added or name changed in the contacts of people app.
I think VERSION and CONTACT_LAST_UPDATED_TIMESTAMP fields are not exactly what i need.Because they may be updated when other details in the
are changed.
I need to monitor the contacts change when my app starts,if there any changes in contacts i need to get that contact details and send it to server to know his status.Is running a service with content observer
will work for this case.
If it works how can i get the updated contact details.
Could someone help me?

Categories

Resources