Skip to main content

Posts

Showing posts with the label Call

Android Basic Tutorial : Call log deletion in Android

Call log Basics A content provider is used to share data between multiple applications. In Android, a content provider is a specialized type of data store that exposes standardized ways to retrieve and manipulate the stored data. The call log data is used by multiple applications and hence android stores it as a content provider. The Call Log provider contains information about placed and received calls.
To do: Get uri for call log content provider.Query the content provider.Search the row in result set(curser) .Delete the row from content provider.
URI The call log content provider exposes a public URI “content://call_log/calls” for recent phone calls that uniquely identifies its data set. Uri allCalls = Uri.parse(“content://call_log/calls”);
Querying a Content Provider To access database we need to query the content provider by using the uri which the given content provider exposes. Cursor c = managedQuery(allCalls, null, null, null, null);
Reading retrieved data for deleting particular …

How to make an Call in Android ?

/**      * Make phone call      */
    public void testPhoneCall() {         Log.v("Test", "[*] testPhoneCall()");         Intent callIntent = new Intent(Intent.ACTION_CALL);         callIntent.setData(Uri.parse("tel:123456789"));         startActivity(callIntent);     }