编程输入秘密code像*#*#4636#*#在Android * [英] Programmatically enter secret code like *#*#4636#*#* on Android

查看:1073
本文介绍了编程输入秘密code像*#*#4636#*#在Android *的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在许多Android设备,你可以进入从手机应用一个秘密设置菜单,键入

On many Android devices you can get into a secret settings menu from Phone app by typing in

*#*#4636#*#*

*#*#4636#*#*

的http://技术的头条新闻。 COM / 2010/09 /四千六百三十六分之十七,Android的secret- codeS /

另外还有一些其他的codeS。

There are also some other codes.

是不是也可以以编程方式打开这个东西?

Is it also possible to open this stuff programmatically?

我已经试过这样:

Intent intent = new Intent(Intent.ACTION_CALL);    
intent.setData(Uri.parse("tel:*#*#4636#*#*"));
startActivity(intent);

但它只是试图发起一个电话,当然失败了,挂断电话并关闭手机的应用程序。

But it just tries to initiate a phone call and of course fails, hangs up and closes the Phone app.

编辑:手机*#*#4636#*#*被保存到我的联系人列表为未知,但电话却偏偏没有。事实上,秘密code当您在手机应用程序手动键入按键上没有pressing呼叫最终才有效。它是不是Phone应用可能只是一个隐藏的功能,它有无关打电话? 如果是这样,人们可以通过编程打开手机应用程序,并模拟上的按钮输入。

The phone *#*#4636#*#* gets saved to my Contact list as "Unknown" but the call just fails. In fact, the secret code only works when you type manually on buttons in Phone app without pressing Call in the end. Is it probably just a hidden feature of Phone app which has nothing to do with calling? If so, one could open the Phone app programmatically and simulate typing on the buttons.

根据这个帖子 <一href="http://stackoverflow.com/questions/6954711/programmatically-$p$pss-a-button-in-another-appplications-activity">Programmatically PSS按钮$ P $在另一个参加办法的活动

这应该是不可能的,因为如果在无根的手机的任何应用程序可以只启动其他应用程序和preSS的东西在那里,它可以接管整个设备的控制和做坏事。

this should NOT be possible because if any app on non-rooted phone could just start other apps and press something there, it could take over control of the whole device and do bad things.

下面是一些细节,但我猜职位是有点老了,甚至如果它的工作可能已经在目前的Andr​​oid版本进行了更改: 的http://mylifewithandroid.blogspot.de/2009/01/generating-key$p$psses-programmatically.html

Here are some more details but I guess the post is a bit old and even if it worked it may have been changed in current Android versions: http://mylifewithandroid.blogspot.de/2009/01/generating-keypresses-programmatically.html

所以,没有更简单的办法进入秘密code?

So, no easier way to enter secret code?

推荐答案

是不是也可以以编程方式打开这个东西?

    Intent in = new Intent(Intent.ACTION_MAIN);
    in.setClassName("com.android.settings", "com.android.settings.TestingSettings");
    startActivity(in);

您只需要观看的logcat输出,了解一下这个神奇的组合,实际上是打开:

You just need to watch logcat output to learn what this magic combination actually opens:

I / ActivityManager(31362):开始{行动= android.intent.action.MAIN   FLG = 0x10000000处CMP = com.android.settings /从PID .TestingSettings}   4257

I/ActivityManager(31362): START {act=android.intent.action.MAIN flg=0x10000000 cmp=com.android.settings/.TestingSettings} from pid 4257

这篇关于编程输入秘密code像*#*#4636#*#在Android *的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆