我怎样才能调用使用Android的我的应用程序的Wi-Fi设置屏幕 [英] How can i call Wi-Fi settings screen from my application using Android
问题描述
通常情况下,我得到的无线网络连接设置屏幕上的模拟器通过点击设置>无线控制> WiFi设置
。我需要上的Wi-Fi按钮pressing我所创建的时候,从我的程序直接进入Wi-Fi设置屏幕。联系人,通话记录,我们可以处理使用Intent.setData(android.provider.contacts ...........)。有没有什么办法可以从一个Android程序中打开设置子菜单/菜单?
请给我建议或样品code。关于这一点。
Normally I am getting Wi-Fi setting screen on the emulator by clicking on the Settings > Wireless controls > wifi settings
. I need to go directly to the Wi-Fi settings screen from my program when pressing on the Wi-Fi button which I have created. Contacts, call Logs we can handle by using Intent.setData(android.provider.contacts...........). Is there any way to open settings sub menus/menu from an android program ?
Please give me advise or sample code on this.
推荐答案
看<一href="http://developer.android.com/reference/android/provider/Settings.html"><$c$c>android.provider.Settings$c$c>对于一系列的意图
动作,你可以用它来发动各种设置屏幕(例如, ACTION_WIFI_SETTINGS
)。
Look at android.provider.Settings
for a series of Intent
actions you can use to launch various settings screens (e.g., ACTION_WIFI_SETTINGS
).
编辑:添加的编码行
startActivity(新意图(Settings.ACTION_WIFI_SETTINGS));
这篇关于我怎样才能调用使用Android的我的应用程序的Wi-Fi设置屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!