本文介绍了访问标准Android设置:SIM卡的PIN码code的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的第一个问题!
我想知道如何访问到标准设置在Android中,特别是SIM卡的功能。
在启动时,我的三星I-9000显示了插入PIN code只有几秒钟,然后消失在窗口,所以我想用我自己,以便制定一个推出标准的窗口插入主屏幕小部件PIN code,但我不知道我该怎么办呢!

This is my first question!I'd like to know how to access to standard settings in android, in particular SIM features.On boot, my Samsung i-9000 shows the window for insert the PIN code only for a few seconds, then disappears, so I'd like to develop by myself a widget for the homescreen that launch the standard window to insert the PIN code, but I don't know how can I do it!

或者好歹来改变窗口的屏幕超时...

Or someway to change the screen timeout of that window...

非常感谢你!

推荐答案

使用Android中的TelephonyManager。结果
您不要直接实例化这个类;相反,你检索通过Context.getSystemService(Context.TELEPHONY_SERVICE)的引用实例

By using the TelephonyManager in Android.
You do not instantiate this class directly; instead, you retrieve a reference to an instance through Context.getSystemService(Context.TELEPHONY_SERVICE)

TelephonyManager manager = (TelephonyManager) Context.getSystemService(Context.TELEPHONY_SERVICE);
int state = manager.getSimState();
if(state == TelephonyManager.SIM_STATE_PIN_REQUIRED || state == TelephonyManager.SIM_STATE_PUK_REQUIRED)
{
         //PIN/PUK is required
}

也许这将帮助你...

May this will help you ...

这篇关于访问标准Android设置:SIM卡的PIN码code的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-25 14:42