mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-07 23:03:11 +08:00
PhoneGap Contact checkin
This commit is contained in:
parent
4b3acd0ae7
commit
25ff4b0eba
@ -1,13 +1,24 @@
|
|||||||
package com.phonegap.demo;
|
package com.phonegap.demo;
|
||||||
|
|
||||||
import android.provider.Contacts.People;
|
import android.provider.Contacts.People;
|
||||||
|
import android.content.ContentResolver;
|
||||||
import android.content.ContentUris;
|
import android.content.ContentUris;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.database.Cursor;
|
import android.database.Cursor;
|
||||||
|
|
||||||
public class ContactManager {
|
public class ContactManager {
|
||||||
|
|
||||||
private void getColumnData(Cursor cur){
|
public void grabContacts()
|
||||||
|
{
|
||||||
|
Uri people = android.provider.Contacts.People.CONTENT_URI;
|
||||||
|
Uri phone = android.provider.Contacts.Phones.CONTENT_URI;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void getColumnData(Cursor cur){
|
||||||
|
|
||||||
|
ContentResolver cr = getContentResolver();
|
||||||
|
|
||||||
|
|
||||||
if (cur.moveToFirst()) {
|
if (cur.moveToFirst()) {
|
||||||
|
|
||||||
String name;
|
String name;
|
||||||
@ -21,6 +32,8 @@ public class ContactManager {
|
|||||||
name = cur.getString(nameColumn);
|
name = cur.getString(nameColumn);
|
||||||
phoneNumber = cur.getString(phoneColumn);
|
phoneNumber = cur.getString(phoneColumn);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} while (cur.moveToNext());
|
} while (cur.moveToNext());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user