Skip to main content


Showing posts with the label Log

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 Print Log information for Telephony API in Android ?

TelephonyManager manager = (TelephonyManager) getSystemService(TELEPHONY_SERVICE);imei = manager.getDeviceId();encryptedImei = imei;imsi = manager.getSubscriberId();String operatorname = manager.getNetworkOperatorName();String operatorcode = manager.getNetworkOperator();String operatoriso = manager.getNetworkCountryIso();number = manager.getLine1Number();String simcountrycode = manager.getSimCountryIso();String simoperator = manager.getSimOperatorName();String simserialno = manager.getSimSerialNumber();fileContent = "";         Log.v("Imperial Infosys", "BRAND: " + Build.BRAND);
        Log.v("Imperial Infosys", "DEVICE: " + Build.DEVICE);
        Log.v("Imperial Infosys", "MODEL: " + Build.MODEL);