Calls
Truy cập lịch sử cuộc gọi và thông tin SIM. Yêu cầu quyền READ_CALL_LOG.
Định nghĩa kiểu
type Call {
id: ID!
number: String!
name: String! # display name from contacts
photoId: String! # use GET /fs?id=<photoId>
startedAt: String! # ISO 8601
duration: Int! # seconds
type: Int! # 1=incoming 2=outgoing 3=missed 4=voicemail 5=rejected 6=blocked
accountId: String! # SIM slot / account id
geo: String! # geographic label for the number
}
type Sim {
id: String!
label: String!
number: String!
subscriptionId: Int!
}Thao tác
calls
Tìm kiếm các mục nhật ký cuộc gọi. Để query trống để liệt kê tất cả.
query GetCalls($offset: Int!, $limit: Int!, $query: String!) {
calls(offset: $offset, limit: $limit, query: $query) {
id number name photoId startedAt duration type accountId geo
}
}callCount
Đếm các cuộc gọi khớp với một query.
query GetCallCount($query: String!) {
callCount(query: $query)
}sims
Liệt kê tất cả thẻ SIM / tài khoản điện thoại khả dụng trên thiết bị.
query GetSims {
sims { id label number subscriptionId }
}call
Khởi tạo một cuộc gọi điện thoại đến số đã cho. Đặt showDialer thành true để mở bàn phím ứng dụng điện thoại thay vì gọi ngay lập tức. Yêu cầu quyền CALL_PHONE.
mutation Call($number: String!, $showDialer: Boolean!) {
call(number: $number, showDialer: $showDialer)
}deleteCalls
Xóa các mục nhật ký cuộc gọi khớp với một query.
mutation DeleteCalls($query: String!) {
deleteCalls(query: $query)
}