我是android的初学者,并开发了一个android应用程序来监视用户呼叫时的网络状态(无论是来电还是对外电话).
我可以通过实现.for类和重写onCallStateChanged方法来监视网络状态PhonestateListner传入呼叫,我在onCallStateChanged方法中使用TelephonyManager类中定义的常量(CALL_STATE_IDLE、CALL_STATE_OFFHOOK和CALL_STATE_RINGING),但是这些常量不能正确地用于传出呼叫.
my question is
如何监视呼叫状态(铃声,OFF_HOOK,空闲)时,有一个传出电话?
利用构建小型机房数据库应用程序。我不断犯错误:
Cannot create an instance of class com.learning.kotlinreadexstingroomdb.MainViewModel
...
Caused by: java.lang.InstantiationException: java.lang.Class<com.learning.kotlinreadexstingroomdb.MainViewModel> has no zero argument constructor
at java.lang.Class.newInst