hi Galbayar D, thanks for your help.it works fine and it has solve my issue. appreciate what you have done.
have another issue when a call is receiving how to delete the call log entry. i have tried it but it always delete the other entries not the current call entry. this is my method public void clearCallLog() { Cursor c = getContentResolver().query(Calls.CONTENT_URI, null, Calls.NUMBER + "='" + mobileNumber + "'", null, Calls.DATE + " DESC"); getContentResolver().cancelSync(Calls.CONTENT_URI); startManagingCursor(c); String number = null; String date; int dateColumn = c.getColumnIndex(Calls.DATE); int numberColumn = c.getColumnIndex(Calls.NUMBER); if (c != null) { if (c.moveToFirst()) { // do { // Get the field values date = c.getString(dateColumn); number = c.getString(numberColumn); Log.d("NUmber", number); Log.d("Date", date); alert("number", number); // } while (c.moveToNext()); } int i =getContentResolver().delete(Calls.CONTENT_URI, Calls.NUMBER + "='" + number + "'", null); alert("Delete", Integer.toString(i)); } } regards, Randika -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en