Framework: does Android support USB devices?

by Will » Fri, 13 Mar 2009 08:00:55 GMT


Sponsored Links
 Does the Android framework support USB devices, like Phidgets? Can an
app take a stream of data from a phidget?
--~--~---------~--~----~------------~-------~--~----~



Framework: does Android support USB devices?

by Will » Fri, 13 Mar 2009 08:02:24 GMT


 Clarification: Is there a way to connect a Phidget, via USB, to the
Android and have an application gather input data from the phidget in
real time? (I hope that's clearer).



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Framework: does Android support USB devices?

by Will » Fri, 13 Mar 2009 08:59:34 GMT


 Sidenote: I've made no progress - any help would be fantastically
appreciated.




--~--~---------~--~----~------------~-------~--~----~



Framework: does Android support USB devices?

by ECSOLWI » Fri, 13 Mar 2009 14:06:20 GMT


 Which USB-profile(s) does your Phidget use?

ECSOLWI
--~--~---------~--~----~------------~-------~--~----~



Framework: does Android support USB devices?

by Mike Lockwood » Sat, 14 Mar 2009 19:12:43 GMT


 


I'm not sure what a Phidget is, but currently there are no Java APIs
for dealing with USB at the moment.  We only have built-in support for
USB mass storage and ADB.

If you can give us a better idea of what you are trying to do, we will
be able to consider it as a feature request.

Mike

-- 
Mike Lockwood
Google android team

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. URL and socket closing

Hi,

I have a problem about correctly closing the underlying socket after
opening and reading an input stream from a URL object. The following
code leaves many (i.e. all) sockets open (in the CLOSE_WAIT state, as
netstat reports):

        private void test() {
                for (int i = 0; i < 10000; i++) {
                        try {
                                String urlStr = "http://test-url.com/?q=" + i;
                                URL url = new URL(urlStr);
                                InputStream is = url.openStream();
                                byte[] buffer = new byte[1024];
                                int len = is.read(buffer);
                                String content = "";
                                while (len != -1) {
                                        content += new String(buffer, 0, len);
                                        len = is.read(buffer);
                                }
                                is.close();
                        } catch (Exception e) {
                                Log.w(TAG,e);
                        }
                        Log.i(TAG, "i: " + i);
                }
        }

As a consequence, no more sockets can be opened after a while. The
problem does not seem to occur when running the same code in a
"normal" java program (i.e. not in android). Am I missing something
here? Or is this problem due to a bug in android? How could I read
many URLs without running into this problem? (I want to query a web
service with lots of different parameters, that's why I need to open
that many connections.)

By the way: The problem only occurs, if the urlStr changes in each
loop.

Thanks for any hints,

Michael


--~--~---------~--~----~------------~-------~--~----~

2. Android y Python

It should be possible to make Jython available without an inordinate
amount of work. It is technically just Java libraries.
--~--~---------~--~----~------------~-------~--~----~

3. Arabic For Android

4. How can I set a clip area in View?

5. Question about Activity.onStop()

6. Problem:ActivityManager Error type 3

7. Set current wall time (system time) failed