APISonar


com.xabber.android.data.database.realm.PushLogRecord.Fields.TIME

> com > xabber > android > data > database > realm > PushLogRecord > Fields > TIME
com APIs xabber APIs android APIs data APIs database APIs realm APIs PushLogRecord APIs Fields APIs TIME APIs

Example 1
public static List<String> getPushLogs() {
        Realm realm = RealmManager.getInstance().getRealmUiThread();
        List<String> logs = new ArrayList<>();
        RealmResults<PushLogRecord> records = realm.where(PushLogRecord.class)
                .findAllSorted(PushLogRecord.Fields.TIME, Sort.DESCENDING);
        for (PushLogRecord record : records) {
            String time = new SimpleDateFormat("yyyy.MM.dd - HH:mm:ss",
                    Locale.getDefault()).format(new Date(record.getTime()));
            logs.add(time + ": " + record.getMessage());
        }
        return logs;
    }