What is the mechanism of contacts syncing in any mobile application? - android

i have a question regarding - how contacts are synced between your android app and server to retreive particular contacts just like whatsapp? Can anyone help me out here?

You basically need to add permission to read the device contacts and then you'll have access to them. There's a guide here: https://developer.android.com/training/contacts-provider/retrieve-names.html

since contact is a shared data. you have to to use content providers to update conact. Refer this http://developer.android.com/guide/topics/providers/content-provider-basics.html

Related

Sync contacts firebase

I'm developing a feature in my app to help users find friends who are registered and are in the contact list on the phone. Something like what instagram does here:
Does firebase have any way to synchronize and compare contacts? I think that comparing each phone contact with each database contact will not be very efficient in terms of performance.
Does firebase have any way to synchronize and compare contacts?
It does not. You should create your own system for that.
I think that comparing each phone contact with each database contact will not be very efficient in terms of performance.
Is not. In fact, is quite simple and efficient since Firebase SDK provides a method that can help you simply verify if a user exist or not in the database, this method is called exists().
For more informations, please also see my answer from this post.

Android: How import contacts from device address book to my android app?

Android 4.3.
I write android application that show/edit/add/remove conacts that user input.
But I has many contacts in my adress book on device. So I want to imprort all this conacts from device adress book to my android application. How I can do this?
Use ContentProvider components in your application.
ContentProvider definition according to Android documentation:
Content providers can help an application manage access to data stored
by itself, stored by other apps, and provide a way to share data with
other apps. They encapsulate the data, and provide mechanisms for
defining data security.
Follow the link to learn about content provider
codetutor
else follow the vogella tutorial about contacts
you will use content resolver api to query your phone book and retrieve contacts list .this is useful
tutorial

How to use android ContactsContract.Data

I am working on an IM application in android. Now i created a separate table for maintaining the app contacts. In this case my contacts are difficult to manage when there is a change in contacts of android system. For avoiding this I found to use a Sync Adapter with ContactsContract provider. I referred the developer document for managing the contacts. I found how to create account, raw contact on an existing contact. Now what i need is how to have my columns(Presence[String],subscription status[integer], etc.) on ContactsContract.Data. I know I have to create my own DataKinds, but I don't know how to. So please give me some solutions to solve this. Thanks in advance.
finally I found how to keep status, presence details in ContactsContract.Data by this link...

Android- Change permissions of app

I know this is not a technical question but I've searched a lot of time and can't find a suitable answer:
I would like to change the permissions of my app. You can find the app here: https://play.google.com/store/apps/details?id=io.trigger.forge2dd999d0f14b11e1bc8612313d1adcbe&feature=search_result#?t=W251bGwsMSwyLDEsImlvLnRyaWdnZXIuZm9yZ2UyZGQ5OTlkMGYxNGIxMWUxYmM4NjEyMzEzZDFhZGNiZSJd
If you look at "Permissions" it says:
YOUR PERSONAL INFORMATION
READ CONTACT DATA
Allows the app to read all of the contact (address) data stored on your tablet. Malicious apps may use this to send your data to other people. Allows the app to read all of the contact (address) data stored on your phone. Malicious apps may use this to send your data to other people.
And I would like to remove this so that the app does not read contact data of a user. Can someone tell me please how to do that?
Thanks,
enne
If the app doesn't actually access the contacts API, then you can safely remove the corresponding <uses-permission/> from your AndroidManifest.xml file and rebuild your APK.
http://developer.android.com/guide/topics/manifest/uses-permission-element.html
Just to add to Jeremy's answer about , looks like the permissions you are using are: android.permission.READ_PROFILE and android.permission.READ_CONTACTS
You need to remove those. For more details check this out:
http://developer.android.com/reference/android/Manifest.permission.html

android check if a contact installed an app android (like whatsapp)

I want to let my app scan the users contactlist , and display the name of the contacts who also installed the app.
I have no idea where to begin with this . so if someone could help me getting started , that would be apreciated.
grtz
You will need to research ContentResolver because you will have to query the database containing the contacts. To do these queries, you will need the URI and column/header names for contacts db which can be found in the Contacts class.
You will also need users to register that they have your app on your own servers and the registration will need a piece of information about the user that other users would have in their contacts (the users phone number, email address, etc).
You will then need to query a few users at a time from the users contacts for this piece of information (using the ContentResolver and Contacts class), pass it to your server (as text) where it will check if they are registered, then send a message back to initial user (and possibly the match) that you found a match.
That's where you should start, and end :)
Note, you will need these permissions in the Manifest file:
android.permission.INTERNET
android.permission.READ_CONTACTS
First of all, welcome to StackOverflow. StackOverflow is for programming questions. As is such, a post asking for help should always provide a description of what you have already tried. If you haven't tried anything yet, I highly encourage you to try something, and post when you encounter a problem.
As your question stands now, we don't know what the problem is. Are you having problems scanning a contact list? Or are you having problems trying to figure out if another user has installed the app?
That being said, you will have to maintain a database for your app containing a list of people who have installed your app. When your app is launched on one device, do whatever you need to do to register the user in your database. Due to the nature of a "contact," one person's phone may only have their phone number, email address, or even just a name. This is of course something you will have to deal with in your implementation.

Categories

Resources