在黑莓上,是否有任何可以在电话响铃之前和之后发生的暴露事件?
e.g。如果数字是999-9999,你可以动态覆盖戒指设置而不是响铃吗?
答案 0 :(得分:8)
是的,非常可能。 您需要挂钩“电话活动”并创建电话听众。 文档给出了一些暗示。所以启动你最喜欢的Java IDE并坚持下去!
http://na.blackberry.com/eng/deliverables/1076/development.pdf(查看第190页)
Listen for phone events. >Implement the PhoneListener interface.
Register the phone listener. >Invoke Phone.addPhoneListener().
Remove a phone listener. >Invoke removePhoneListener().
当新呼叫到达时,它使用 callIncoming(int)回调。还有更多:
A call is added to a conference call.
callAdded(int)
A BlackBerry® device user answers a call (user driven).
callAnswered(int)
A conference call is established.
callConferenceCallEstablished(int)
The network indicates a connected event (network driven).
callConnected(int)
A direct-connect call is connected.
callDirectConnectConnected(int)
A direct-connect call is disconnected.
callDirectConnectDisconnected(int)
A call is disconnected.
callDisconnected(int)
A BlackBerry device user ends the call.
callEndedByUser(int)
A call fails.
callFailed(int, int)
A new call arrives.
callIncoming(int)
The BlackBerry device initiates an outgoing call.
callInitiated(int)
A call is removed from a conference call.
callRemoved(int)
A held call resumes.
callResumed(int)
A call is waiting.
callWaiting(int)
A conference call is ended (all members are disconnected).
conferenceCallDisconnected(int)