我怎样才能获得ADK DEMOKIT例如工作在谷歌I / O的Galaxy Tab 10.1? [英] How can I get the ADK DemoKit example working on a Google I/O Galaxy Tab 10.1?

查看:154
本文介绍了我怎样才能获得ADK DEMOKIT例如工作在谷歌I / O的Galaxy Tab 10.1?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让 DEMOKIT例如工作的一个ADK板。这似乎是即使在3.1更新的Galaxy Tab 不具有的一切需要(或至少​​不工作像广告)。甚至与挖掘,虽然它看起来像三星的Kies应用程序的文档可能的方式获得。

I'm trying to get the DemoKit example working on an ADK board. It seems like even with the 3.1 update the Galaxy Tab doesn't have everything it needs (or at least doesn't work as advertised). And even with digging though the documentation it seems like the Samsung Kies app is possibly getting in the way.

这将不会运行,如果我用的是API级别10库的指示(通过调试器步进我看到这个异常: java.lang.NoClassDefFoundError的:com.android.future.usb.UsbManager )。同样的事情发生,如果我用的是API级别12库。

It won't run if I use the API Level 10 Libraries as instructed (stepping through the debugger I see this exception: java.lang.NoClassDefFoundError: com.android.future.usb.UsbManager). The same thing happens if I use the API Level 12 Libraries.

设置目标是3.1平台(简单地改变它在项目属性),它不会编译(由于使用的 com.android.future.usb 库)。我发现一些更改,你必须做的在3.1,并从使用USB包,这些都是我要DemoKitActivity.java

Setting the target to be the 3.1 platform (simply changing it in the project properties) it won't compile (due to use of the com.android.future.usb library). I found some documentation of some changes that you have to do to use the USB package on 3.1 and from that, these are the changes I made to DemoKitActivity.java

37,38c37
< import com.android.future.usb.UsbAccessory;
< import com.android.future.usb.UsbManager;
---
> import android.hardware.usb.*;
128c127
< UsbAccessory accessory = UsbManager.getAccessory(intent);
---
> UsbAccessory accessory = (UsbAccessory) intent.getParcelableExtra(UsbManager.EXTRA_ACCESSORY);
139c138
< UsbAccessory accessory = UsbManager.getAccessory(intent);
---
> UsbAccessory accessory = (UsbAccessory) intent.getParcelableExtra(UsbManager.EXTRA_ACCESSORY);
152c151
< mUsbManager = UsbManager.getInstance(this);
---
> mUsbManager = (UsbManager) getSystemService(Context.USB_SERVICE);

即使让我一直运行到的问题,虽然这些变化。现在安装并为DEMOKIT应用程序的初始屏幕出现了请连接DEMOKIT板,但每当我连接ADK板,并关闭USB调试(带它,它什么都不做),我刚刚得到的三星Kies的应用程序,它说:preSS home键退出三星的Kies,并没有其他的按键反应。击中家庭和打算回DEMOKIT应用程序,只需再次显示了连接屏幕,它从来没有真正连接到主板。

Even after making those changes I've been running into issues though. It installs now and the initial screen for the DemoKit app comes up with the "Please connect a DemoKit board", but whenever I connect the ADK board and turn off USB debugging (with it on it, it does nothing), I just get the Samsung Kies app which says "Press the home key to quit Samsung Kies" and no other buttons respond. Hitting home and going back into the DemoKit app just shows the connect screen again and it never really connects to the board.

怎么可以这样做的工作?是否与银河标签10.1(谷歌I / O版)的ADK的工作,如果是这样,我是在正确的轨道?

How can this be made to work? Does the ADK work with the Galaxy Tab 10.1 (Google I/O edition) and if so, am I on the right track?

下面是Arduino的串口监视器说的话不管调试模式是对或关闭平板电脑(需波特率设置为115200读取输出):

Here's what the Arduino serial monitor says regardless if debug mode is on or off on the tablet (need to set the baud rate to 115200 to read the output):

设备地址...请求设备描述符。

Device addressed... Requesting device descriptor.

发现可能的设备。交换台,以串行模式

found possible device. swithcing to serial mode

数据包错误:5could无法读取器协议版本

Data packet error: 5could not read device protocol version

它重复不断,而它的插入到平板电脑。

It repeats constantly while it's plugged in to the tablet.

我意识到我没有更新的Andr​​oidManifest.xml 文件...改变:

I realized I didn't update the AndroidManifest.xml file... Changing:

<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="11" />

<uses-sdk android:minSdkVersion="12" android:targetSdkVersion="12" />

<uses-library android:name="com.android.future.usb.accessory"/>

<uses-feature android:name="android.hardware.usb.accessory"/>

这似乎并没有改变任何东西一旦我得到了纠正。

It didn't seem to change anything once I got that corrected.

我已经通过电子邮件发送三星的支持,并正在等待答复。

I have emailed Samsung support and am awaiting a reply.

推荐答案

我的道歉,配件模式目前不会与三星Galaxy Tab 10.1的工作。三星已经意识到这个问题,并正在努力解决它。当设备不支持附件模式,你应该能够使用com.android.future.usb。*的API,这将使它更容易为你写一个应用程序,无论工作与Android 3.1和2.3.4。

My apologies, accessory mode currently doesn't work with the Samsung Galaxy Tab 10.1. Samsung is aware of the issue and is working on resolving it. When the device does support accessory mode you should be able to use the com.android.future.usb.* APIs which will make it easier for you to write an app that works both with Android 3.1 and 2.3.4.

这篇关于我怎样才能获得ADK DEMOKIT例如工作在谷歌I / O的Galaxy Tab 10.1?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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