本文介绍了如何导入com.android.internal.telephony.gsm的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:结果
  How访问com.android.internal.telephony.gsm.GsmSmsDispatcher实例?

对不起,我在Android上新的开发人员,我不知道如何导入和调用com.android.internal.telephony.gsm。我试图进口com.android.internal.telephony.gsm钻就不能得到解决。 (我现在使用的API 10)我需要做什么?
你能帮我吗 ?
在此先感谢

Sorry, I'm new developer on android and I don't understand how import and invoke com.android.internal.telephony.gsm. I tried "import com.android.internal.telephony.gsm" bur it cannot be resolved. (now I use API 10) What I need to do?Can u help me ?Thanks in advance

推荐答案

这是一个内部类,你不应该使用它。为了确保中,SDK明确排除内部类,以便使它工作,你必须破解的SDK,并做一个假目标。然后你可以使用反射来创建正确的类。但是,即使你这样做,你可能做这个访问内部电话类信息,并作为访问仍然只限于从正确的线程中调用呼叫者您将无法这样做。

It is an internal class and you are not supposed to use it. To make sure, the SDK specifically excludes the internal classes so to make it work you have to hack the sdk and make a fake target. Then you can use reflection to create the correct class. However, even if you do so, you are probably doing this to access internal Phone class information and you will be unable to do so as the access remains restricted to callers that call from the correct thread.

在成功的情况下,你的code可能会在下一版本打破。

In the event of success, your code would likely break on the next release.

这篇关于如何导入com.android.internal.telephony.gsm的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-12 23:42