Can Android interface with USB devices?

by Will » Sat, 14 Mar 2009 02:12:08 GMT


Sponsored Links
 Question for anyone who knows:

Can Android interface with USB devices, like Phidgets?  I didn't find
any documentation indicating either way. Has anyone done any work with
USB devices connected to the G1?

My goal is to use a Phidget Encoder to stream data into Android for an
app I'm writing.

Thanks a bunch! (I would appreciate any kind of answer :P   )

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



Other Threads

1. Can麓t create an AudioRecor der object

what is the value of the variable SAMPLE_RATE?




-- 

2. Widget setOnClickPendingIntent not working

Hello,
I have a simple widget and I'm trying to pop up another activity when
it's clicked. My widget is not focusable or clickable even though in
the XML layout I explicity set it to be and when my widget is clicked
nothing happens.

My manifest has:
<receiver android:name=".WidgetConfigurator" android:label="@string/
app_name">
            <intent-filter>
                <action
android:name="android.appwidget.action.APPWIDGET_UPDATE" />
            </intent-filter>
            <meta-data android:name="android.appwidget.provider"
android:resource="@xml/widget" />
        </receiver>

My layout is:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:id="@+id/widgetlayout"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:background="@drawable/widget_background"
    android:paddingLeft="19dip"
    android:paddingTop="21dip"
    android:clickable="true"
    android:focusable="true" >

        <TextView android:id="@+id/widgettext"
            android:text="Click here to set the text."
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:layout_alignParentLeft="true"
            android:maxWidth="284dip"
            android:maxHeight="58dip"
            android:textSize="12dip"
            android:textColor="@android:color/black"
            />

</RelativeLayout>

And my AppWidgetProvider's onUpdate code contains:
        @Override
        public void onUpdate(Context ctx, AppWidgetManager appWidgetManager,
int[] appWidgetIds) {
                if(man == null)
                        onEnabled(ctx);

                Log.i(TAG, "Updating");
                RemoteViews updateViews = new RemoteViews(ctx.getPackageName(),
R.layout.widget);

                Random rand = new Random();
                for(int k = 0; k < appWidgetIds.length; k++) {
                int i = rand.nextInt(count);

                Intent intent = new Intent(ctx, WidgetClick.class);
                        PendingIntent pendingIntent = 
PendingIntent.getBroadcast(ctx, 0,
intent, 0);

                updateViews.setOnClickPendingIntent(R.id.widgetlayout,
pendingIntent);
                        updateViews.setTextViewText(R.id.widgettext,
storiesArray.get(i));

                        appWidgetManager.updateAppWidget(appWidgetIds, 
updateViews);
                }
        }


Everything in my onUpdate works perfectly other than the
setOnClickPendingIntent command. Am I doing something wrong?

-- 

3. Miring DreamWTB dream second

4. how to wrap content in optionsmenu?

5. multiple parameters with rawQuery in sqlite = BUG

6. How do I simulate the Home key programmatically?

7. How to launch YouTube with specified keywords?