简体   繁体   English

如何处理 j2me 呼叫事件/中断

[英]How to handle j2me call events/interruptions

I have to implement the code in which I have to call, then have to get the call duration and also should be notified when the call is ended .我必须实现我必须调用的代码,然后必须获取通话持续时间,并且还应该在通话结束时得到通知

I know it's not possible in j2me with MIDP 2.0 but still if anyone has solved this issue however, plz post ur solutions here.我知道在 j2me 中使用 MIDP 2.0 是不可能的,但是如果有人解决了这个问题,请在此处发布您的解决方案。 I need it.我需要它。

I have already done calling with the method platformRequest() but I am unable to track the call duration, event when call was not received and end call event .我已经使用方法platformRequest()完成了调用,但我无法跟踪通话持续时间、未收到通话时的事件和结束通话事件

Plz do reply some gud solutions if any of these things is possible.如果这些事情是可能的,请回复一些 gud 解决方案。

You cannot access this type of native functionality using VM.您无法使用 VM 访问此类本机功能。

You can try and make a rough estimation but this won't cover all circumstances eg when you application gets closed or the Date/Time of the phone is changed but it's the best I could think.您可以尝试进行粗略估计,但这不会涵盖所有情况,例如当您的应用程序关闭或手机的日期/时间发生更改时,但这是我能想到的最好的情况。

You could persist the amount time it has taken using a RecordStore.您可以使用 RecordStore 保留它所花费的时间。 The basic idea would be to persist the time before you make a call to the platformRequest() and record what the time is within different sections of the MIDlet life cycle functions and make the best guess you can.基本思想是在调用 platformRequest() 之前保留时间,并记录 MIDlet 生命周期函数的不同部分中的时间,并做出最好的猜测。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM