问题描述
我的应用程序需要积极的WiFi连接。我添加的按钮进入WiFi设置与此code
My app needs active wifi connection. I added button "Go to wifi settings" with this code
Intent settings = new Intent(Settings.ACTION_WIFI_SETTINGS);
settings.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(settings);
这是完美的作品对95%的设备。但在Nook Color的我有错误
It is works perfect on 95% of devices. But on Nook color I have error
android.content.ActivityNotFoundException:无活动处理 意向{行为= android.settings.WIFI_SETTINGS FLG = 0x10000000处}
如何打开的角落/ Nook Color的WiFi设置?
How to open wifi settings on Nook/Nook color?
推荐答案
摘要:
1 - 查找角落期望的活动的全名。
它2 - 设置你的意图类名。
3,开始你的意图。
详细信息:
1-A:将设备连接到电脑,您正在开发的项目
1-B:打开层次的角度来看
日食,然后打开窗口
从这一角度
。1-C:在设备手动打开你的活动(首页 - >设置 - > ...)
1-D:这可能是需要做的刷新对窗口
透视
。1-E:他们的完整名称和包名的所有现有活动只能在
。 的Windows
Hierarchy视图视角
例如,在这里我需要的活动名称是: com.android.settings.WirelessSettings
和它的包名是 com.android.settings
。
Summary:
1-Find desired activity's complete name in Nook.
2-Set your intent classname with it.
3-Start your intent.
Details:
1-a:Connect your device to PC that you are developing your project.
1-b:Open Hierarchy view perspective
of eclipse and then open Windows
in that perspective.
1-c:Open your desired Activity manually in device.(home -> setting -> ...)
1-d:It may be need to do refresh on Windows
in perspective.
1-e:All existing Activities with their complete name and package name must be seen in Windows
in Hierarchy view perspective
.
For example,here my desired activity name is:com.android.settings.WirelessSettings
and it's package name is com.android.settings
.
我希望这个片段code可以帮助您继续:
I hope this snippet code help you to continue:
b1 = (Button) findViewById(R.id.button1);
b1.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Intent i = new Intent();
i.setClassName("com.android.settings",
"com.android.settings.WirelessSettings");
startActivity(i);
}
});
有关详细信息从另一个调用应用程序
你可以看到这个问题:的 - Q2
For more details on Calling App from another
you can see this questions: Q1 - Q2
这篇关于如何打开的角落/ NookColor WiFi设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!