// 获取通话记录var CallLog = plus.android.importClass("android.provider.CallLog");var main = plus.android.runtimeMainActivity();var obj = main.getContentResolver();plus.android.importClass(obj);//查询var cursor = obj.query(CallLog.Calls.CONTENT_URI,null,null,null,null);plus.android.importClass(cursor);var content = []; // 用来存储数据var count = 0; // 记录多少条if (cursor.moveToFirst()) {while (cursor.moveToNext()) {count++;//号码var number = cursor.getString(cursor.getColumnIndex(CallLog.Calls.NUMBER));//呼叫类型var type;switch (parseInt(cursor.getString(cursor.getColumnIndex(CallLog.Calls.TYPE))))// 判断通话类型{case CallLog.Calls.INCOMING_TYPE:type = "呼入";break;case CallLog.Calls.OUTGOING_TYPE:type