Does android support USB host?

by mike.hist...@gmail.com » Tue, 28 Apr 2009 11:29:32 GMT


Sponsored Links
 Dear all:
We have a task of making pc cam useable when it plug into a device
which runs android. So we have some questions as below:
1. Does android support USB host?
2. If so, does android include driver for video class device?
3. If so, does android offer SDK for video class device?

Thanks a lot.
--~--~---------~--~----~------------~-------~--~----~

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



Other Threads

1. copy file to emulator sd card

Hi,

Is there any way to copy the files from "assets" folder of the project
to emulator SD card using android application.

Thanks again,
Android user
--~--~---------~--~----~------------~-------~--~----~

2. Create a manet with g1 phones

Hi,

I've successfully created a manet with some G1s and I want to give
some advices to those who are interested in building up an ad-hoc
wireless connection between two or more G1s.
First of all I downloaded Android from the source (http://
source.android.com/download) and I followed the instructions, adding
G1 support as showed in this link: 
http://source.android.com/documentation/building-for-dream.
Hence I've patched the code thanks to Drew Jacob's patches which can
be found here:
https://review.source.android.com/#change,9714
https://review.source.android.com/#change,9718
I recommend to apply the patches by hand, because they are old and
repo leads to some compilation errors.
After that I created the build by running "make".
If you encounter errors read the troubleshooting sections of the pages
listed above. If the compilation process starts complaining about
socket.c you have to comment those lines which are not well digested.
Hence I flashed the device with the fresh build, following this guide:
http://andblogs.net/fastboot/
At this point I created the sdk by running "make sdk". Make sure to
use jdk1.5 instead of jdk1.6
for example:
$ java-config -L
The following VMs are available for generation-2:
1)      Sun JDK 1.5.0.18 [sun-jdk-1.5]
*)      Sun JDK 1.6.0.13 [sun-jdk-1.6]
$ sudo java-config -S 1
Password:
Now using sun-jdk-1.5 as your generation-2 system JVM

To set the JVM as user run:
$ java-config --set-user-vm sun-jdk-1.5
Now using sun-jdk-1.5 as your user JVM

Once I had the build on the phone and the sdk I wrote a simple
application to set up the ad-hoc connection. Here some useful code to
bring up the manet with a basic configuration:

public class Gossip extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        WifiManager mainWifi = (WifiManager)getSystemService
(Context.WIFI_SERVICE);
        WifiConfiguration configuration = new WifiConfiguration();
        List<WifiConfiguration> remembered =
mainWifi.getConfiguredNetworks();
        mainWifi.disconnect();
        int i=0;
        while (i<(remembered.size())){
                mainWifi.removeNetwork(remembered.get(i).networkId);
                i++;
        }
        configuration.SSID="\"YOURSSID\"";
        configuration.networkId = 1;
        configuration.status=WifiConfiguration.Status.ENABLED;
        BitSet setOfBits = new BitSet();
        setOfBits.set(0);
        configuration.allowedKeyManagement=setOfBits;
        configuration.priority=100;
        configuration.isAdhoc=true;
 
configuration.frequency=WifiConfiguration.ChannelFrequency.CHANNEL_11;
        int id = mainWifi.addNetwork(configuration);
        mainWifi.enableNetwork(id, true);
        mainWifi.reconnect();
    }
}

That's all folks
--~--~---------~--~----~------------~-------~--~----~

3. directions intent?

4. Key listener

5. install Android Plug-ins for Eclipse on MacOS

6. How can i get the mobile information??

7. arcade style virtual joystick