Is there a way to access the Dialer/Contacts/Call Log
of Android through an application?
I essentially want to add features/information
, and I know that those databases are unable to be changed past queries and insertions, so I was wondering how to override the stock Dialer/Contacts/Call Log
? Preferably, I'd only like to change one of those, but any info will help.
Asked
Active
Viewed 477 times
0
1 Answers
1
Query android.provider.CallLog.Calls.CONTENT_URI
for getting Callogs as:
String[] strFields = {
android.provider.CallLog.Calls.NUMBER,
android.provider.CallLog.Calls.TYPE,
android.provider.CallLog.Calls.CACHED_NAME,
android.provider.CallLog.Calls.CACHED_NUMBER_TYPE
};
String strOrder = android.provider.CallLog.Calls.DATE + " DESC";
Cursor mCallCursor = getContentResolver().query(
android.provider.CallLog.Calls.CONTENT_URI,
strFields,
null,
null,
strOrder
);
and in manifest.xml add:
<uses-permission android:name="android.permission.READ_CONTACTS"></uses-permission>

ρяσѕρєя K
- 132,198
- 53
- 198
- 213
-
But how would I go about override the built in CallLog, so that when the user clicks the standard CallLog button, it pulls my version up instead of theirs? Sorry for confusion – Odiefrom Jun 23 '12 at 17:50
-
no you can lunch dial activity as Intent intent25 = new Intent(Intent.ACTION_MAIN).addCategory( Intent.CATEGORY_LAUNCHER).setClassName("com.android.contacts", "com.android.contacts.DialtactsActivity").addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) .addFlags(Intent.FLAG_FROM_BACKGROUND).setComponent(new ComponentName("com.android.contacts", "com.android.contacts.DialtactsActivity")); getApplicationContext().startActivity(intent25); – ρяσѕρєя K Jun 23 '12 at 18:27