Hello! I add in my application "Phonebook" output logs of outgoing calls:
SimpleDateFormat dateFormat = new SimpleDateFormat("dd.MM.yyyy HH:mm"); cs = ctx.getContentResolver().query(CallLog.Calls.CONTENT_URI, callTableColumns, WHERE, new String[] {phoneForCallLog}, ORDER_BY); int count = 0; if (cs.moveToFirst()) { do { if (cs.getInt(cs.getColumnIndex(CallLog.Calls.TYPE)) != 3) { String number = cs.getString(cs.getColumnIndex(CallLog.Calls.NUMBER)); String duration = cs.getString(cs.getColumnIndex(CallLog.Calls.DURATION)); String date = dateFormat.format((cs.getColumnIndexOrThrow(CallLog.Calls.DATE))); Further, when the application starts, an incorrect date is displayed (date). Receive: 01/01/1970 03:00. The time on the emulator is set correctly. Please help with this problem.
cs.getColumnIndexOrThrow(CallLog.Calls.DATE)methodcs.getColumnIndexOrThrow(CallLog.Calls.DATE)? - post_zeew