how to get Contact database schema.
- by kamiomar
Dear,
is there any link that provide me the Contact Schema.
when i store new phone number in mobile, the informaion store in the database.
so i need schema to create my own table for back purpose.
i have alreay get People table column by the follwoing code.
boolean displayFlag = false;
String str = "";
Uri CONTACT_URI = People.CONTENT_URI;
Cursor cursor = mContext.getContentResolver().query(CONTACT_URI, null,
null, null, null);
String columnNames = "";
if (cursor != null) {
try {
cursor.getCount();
if (cursor.moveToFirst()) {
String[] columns = cursor.getColumnNames();
for (int i = 0; i < columns.length; i++) {
columnNames += "colName" + cursor.getColumnName(i) + " : "
+ cursor.getString(i) + "colValue";
}
}
} finally {
cursor.close();
}
}
createImage(columnNames);
if (displayFlag) {
Toast.makeText(mContext, str, Toast.LENGTH_SHORT).show();
}
}
Thanks