Go Back   Android Forums > Android Development > Application Development
Application Development Dev lounge for our application developers.

test: Reply
 
LinkBack Thread Tools
Old February 19th, 2012, 06:08 AM   #1 (permalink)
New Member
Thread Author (OP)
 
Join Date: Nov 2009
Posts: 5
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default USB Accessory on Android 2.3.4 Error / Not Error

I'm playing with USB Accessory mode and I have an error which is not an error so I'm confused. In the description [1] it shows that you have to set up a Broadcast Receiver to receive the permission to use the device.

I'm using a Microchip dev board so used their Firmware in the device and their Android app to start with and then branched out to use my own Android App and found that my Broadcast Receiver once it has the accessory in the example [1] and starts to set up the Comms with the device I get an error. Basically once I have the accessory I try to get a ParcelFileDescriptor to set up the comms.

import android.os.ParcelFileDescriptor;

ParcelFileDescriptor parcelFileDescriptor = deviceManager.openAccessory(accessory);

I'm finding that the ParcelFileDescriptor is null!

I thought it was my App so went back to the App supplied by Microchip and it has exactly the same problem but it is working away happily inspite of this. I'm confused as to why I'm adding this code if it's going to give me an error which I seem to be able to ignore. What is the correct way of establishing comms in this situation?

Anybody has any ideas I'd love to hear them.

Thanks

[1] USB Accessory | Android Developers

Advertisements
Arigead is offline  
Reply With Quote
sponsored links
Reply
Tags
usb accessory


Go Back   Android Forums > Android Development > Application Development
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 12:37 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.