Android的WiFi设置中的应用程序(亭-SH的应用程序) [英] Android Wifi Settings within app(Kiosk-sh app)

查看:382
本文介绍了Android的WiFi设置中的应用程序(亭-SH的应用程序)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我写在Android 4.4.2运行的应用程序。我需要让我的应用程序将能够运行(就像是许多呼叫预设模式)的唯一的事情。设备制造商正在删除顶部的菜单栏和导航栏,使用户无法访问任何东西,但我们的应用程序分配是主屏幕。

So I am writing a app that runs on Android 4.4.2. I need to make my app be the only thing that is capable of running(Like what many call kiosk mode). The device manufacturer is removing the top menu bar and navigation bar so the user can't access anything but our app that is assigned to be the home screen.

唯一的问题是我需要的用户能够设置WiFi网络,但现在希望他们能够访问任何类型的任何其他设置。

The only issue is I need the user to be able to setup wifi networks, but do now want them to have access to any other settings of any kind.

在理想情况下我只想要一个WiFi设置弹出窗口,偶尔会出现在其他设备上,当您启用无线网络。

Ideally I just want a wifi settings popup that occasionally comes up on other devices when you enable wifi.

有什么办法来实现,而不需要写我自己的无线网络配置菜单?

Is there any way to achieve this without writing my own wifi configuration menu?

感谢。

编辑: 为了澄清,我已经尝试了简单的意图,但他们没有达到需要的是什么。它们会导致这样的事情: HTTP://g04.s.alicdn。 COM / KF / HT135ULFO0cXXagOFbXV / 2503257 / HT135ULFO0cXXagOFbXV.jpg 当用户仍然可以访问其他设置。

To clarify, I have tried simple intents but they do not achieve what is needed. they result in something like this: http://g04.s.alicdn.com/kf/HT135ULFO0cXXagOFbXV/2503257/HT135ULFO0cXXagOFbXV.jpg Where the user will still have access other settings.

香港专业教育学院使用

startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS));

startActivityForResult(new Intent(Settings.ACTION_WIFI_SETTINGS), 0);

我希望第二个会打开一个对话框,而不是设置,但没有奏效。

I was hoping the second one would open a dialog and not the settings but it didn't work.

推荐答案

以下应完成你追求的是什么:

The following should accomplish what you're after:

Intent intent = new Intent("com.android.net.wifi.SETUP_WIFI_NETWORK");
intent.setComponent(ComponentName.unflattenFromString("com.android.settings/com.android.settings.wifi.WifiSetupActivity"));
intent.addCategory("android.intent.category.DEFAULT");
startActivity(intent);

我想出了这个需要做的东西非常相似,通过狩猎的Andr​​oid设置活动源后。据我所知,还没有一个定义的动作,推出了WiFi的活动没有全部罗列出来的其他设置,但我们可以得到它通过手动组装的意图。

I came up with this after needing to do something very similar and hunting through the source of the Android Settings activities. As far as I can tell, there isn't a defined action to launch the wifi activity without all the other settings listed out, but we can get to it by assembling the intent manually.

这篇关于Android的WiFi设置中的应用程序(亭-SH的应用程序)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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