如何打开的角落/ NookColor WiFi设置 [英] How to open wifi settings on Nook/NookColor

查看:596
本文介绍了如何打开的角落/ NookColor WiFi设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序需要积极的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处}

android.content.ActivityNotFoundException: No Activity found to handle Intent { act=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);
    }
});

有关详细信息从另一个调用应用程序你可以看到这个问题:的 Q1 - <一个href="http://stackoverflow.com/questions/1977243/launching-external-application-from-my-app">Q2

For more details on Calling App from another you can see this questions: Q1 - Q2

这篇关于如何打开的角落/ NookColor WiFi设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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