adk

Long running ADK Accessory (Service?)

寵の児 提交于 2019-12-04 17:41:31
I've spent days trying to get the android ADK connection running in a service rather then activity..... Anyone know if its even possible? I would like to have the service handled inputStream and outputStream so I can read my Arduino for extended periods in the background. When the activity returns to focus I will bind with the service and update the GUI. If this is possible I would eventually like to update a website with the live data from the service for remote monitoring. Any help if appreciated. I'm new to programming and can't seem to find much info on this topic. Thank you in advace for

AVD Manager can't find tools\android.bat even though it's there

删除回忆录丶 提交于 2019-12-03 21:38:08
问题 I've researched this on the internet so much and nothing I find is helping me out. I got the SDK manager to run, but when I try to run the Adroid AVD Manager, it doesn't run!!!!! Why? It says, word for word, "Failed to execute tools\android.bat: The system cannot find the file specified." Why can it not find a file that is clearly where it is looking? PS I'm running windows 8, installed the latest version of the ADK. 回答1: The latest SDK has AVD Manager in the SDK Manager itself. Open SDK

Remove USB Accessory permission dialog

感情迁移 提交于 2019-12-03 20:30:25
I am working on an application which uses USB accessory.When I attach device to arduino it asks for usb permission and it has checkbox in dialog "use by default".When I checked and press ok then it should save permission and do not ask me again but it is asking for permission every time I attach USB.I want to save permission is there any way to save this? My Code loooks like @Override public void onResume() { super.onResume(); if (mInputStream != null && mOutputStream != null) { // streams were not null"); return; } // streams were null"); UsbAccessory[] accessories = mUsbManager

Setting up a cover flow in Android

百般思念 提交于 2019-12-03 19:46:01
问题 I created an iphone application, and now I am consigned to do the same application in android. I used the OpenFlow from thefaj on github https://github.com/thefaj/OpenFlow however I have yet to be able to find something with a working coverflow on the android.. Does anyone have experience with this in android or know a good place to start ? 回答1: I used this code on my project http://www.inter-fuser.com/2010/02/android-coverflow-widget-v2.html You can adapt it to load the contents from some

Proper way to close a USB accessory connection

僤鯓⒐⒋嵵緔 提交于 2019-12-03 18:51:28
问题 What is the proper way to close a connection to a UsbAccessory in Android? It seems the even in the stock Google example, if I connect and accessory, exit the app and then go back to it, the connection is not re-established. Looking closely, it seems that after calling close() on the FileDescriptor , it won't open again, and a "could not open /dev/usb_accessory" log is emitted. NOT calling close() is a bad option, as a thread blocking on read() will not be released. Upon physical

Including other Eclipse Projects in an Android application project

*爱你&永不变心* 提交于 2019-12-03 13:23:53
I have a library-only Android eclipse project (no main class, only library classes) that I want to include in my main Android Application project. I went to the Build Path and added the library project to the "Required projects on the build path" on the Projects tab, and checked it on the "Order and Export" tab. However, when the application is run, it emits VerifyError exception, because the class from the library project didn't happen to be packaged together in the apk. Any solution to this? Android projects don't get packaged in, unfortunately. If your library project only has classes, not

ADK and Eclipse woes - com.android.future and USBAccessory?

Deadly 提交于 2019-12-03 06:41:51
I am trying to get ADK (Accessory Development Kit) set up with Eclipse, but after updating to API 12, to run the demokit Hello World, I get the 29 errors, the first few looking like: com.android.future cannot be resolved, etc UsbAccessory cannot be resolved to a type You need to set your build target to Google APIs, not Android. Click on Project->Properties, then in the dialog box, select Google APIs (2.3.3) instead of Android 2.3.3. 来源: https://stackoverflow.com/questions/6080147/adk-and-eclipse-woes-com-android-future-and-usbaccessory

Android ADK with PC as USB Host with libusb, bulk transfer error

偶尔善良 提交于 2019-12-03 03:25:32
问题 I'm trying to make my PC the USB Host for Android 2.3.4 devices in order to be able to develop APIs without needing actual "accessories". To do this, I need to establish the PC as the USB Host and the "device" (in my case a Nexus One running 2.3.4). I started with libusb code from http://android.serverbox.ch/ as a base for the PC side and the DemoKit code and Android documentation on the Android side. The two seems to negotiate the connection fine, and the interface gets "claimed" but dies on

AVD Manager can't find tools\\android.bat even though it's there

半城伤御伤魂 提交于 2019-11-30 22:52:22
I've researched this on the internet so much and nothing I find is helping me out. I got the SDK manager to run, but when I try to run the Adroid AVD Manager, it doesn't run!!!!! Why? It says, word for word, "Failed to execute tools\android.bat: The system cannot find the file specified." Why can it not find a file that is clearly where it is looking? PS I'm running windows 8, installed the latest version of the ADK. The latest SDK has AVD Manager in the SDK Manager itself. Open SDK Manager -> Tools -> Manage AVDs I was getting the same error and solved it by going to the tools folder (up one

ADK vs JDK vs SDK difference?

蓝咒 提交于 2019-11-30 14:41:38
Lately, I am quite overwhelmed with the words that end with "DK". I know what these abbreviations stand for. ADK: Accessory Development Kit (Android) JDK: Java Development Kit SDK: Software Development Kit But I am still confused what they actually do. In my Android Studio, there are .java and .xml, etc. Is ADK used for .xml files? Is JDK used for .java files? how about SDK? Sorry if it may be like a silly question but I'd appreciate if someone clarifies this for me. Thanks! SDK is a standard development kit. This isn't specific to Java as you can have a SDK for pretty much any language. It is