在哪里是WiFiDirectActivity

在哪里是WiFiDirectActivity

本文介绍了什么/在哪里是WiFiDirectActivity的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正试图理解并实现。这是作为一个单独的类添加到我现有的活动。在示例代码中有一行如下:

I am attempting to understand and implement the (incomplete) code described in "Creating P2P Connections with Wi-Fi". This is to add as a separate class to my existing activity. There is a line in the example code as follows:

activity.setIsWifiP2pEnabled(true);

但不显示变量活动来自哪里。寻找使用setIsWifiP2pEnabled()的其他示例代码我看到如下:

but does not show where the variable "activity" came from. Looking for other example code which employs setIsWifiP2pEnabled() I saw one which declared activity as follows:

private WiFiDirectActivity activity;

但如果我添加该行,我得到错误 WiFiDirectActivity无法解析为一种类型。 Eclipse没有任何导入要添加的建议。所以我被困住了。

but if I add that line I get the error WiFiDirectActivity cannot be resolved to a type. Eclipse has no suggestions for any imports to add. So I am stuck.

推荐答案

该文件是一个示例项目的一部分,而不是一个用于使用的库/ jar。如果您需要它来实现代码,请查看该项目

That file is part of an example project, not a library/jar for you to consume. If you need it for implementing your code, look into that project

请参阅:

这篇关于什么/在哪里是WiFiDirectActivity的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 03:40