📜  使用过滤器 android 获取呼叫登录反应本机 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:18.453000             🧑  作者: Mango

代码示例1
...
/* List call logs matching the filter */
const filter = {
  minTimestamp: 1571835032,    // (Number or String) timestamp in milliseconds since UNIX epoch
                               // if this filter is set, load(limit, filter) will only return call logs with timestamp >= minTimestamp

  maxTimestamp: 1571835033,    // (Number or String) timestamp in milliseconds since UNIX epoch
                               //
                               // if this filter is set, load(limit, filter) will only return call logs with timestamp <= maxTimestamp

  phoneNumbers: '+1234567890', // (String or an Array of String)
                               // if this filter is set, load(limit, filter) will only return call logs for this/these phone numbers
}

const callLogs = await CallLogs.load(-1, filter) // applies filter with no limit (also works with a limit)
...