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. Starting Google Maps from my Activity

Is it possible to start Google Map centered in a specified location from my
Activity? Heard something about geo command from Intent.

Anyone, any idea?

-- 
Dagvadorj

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

2. Resetting XML preferences does not restore default values

Prefs are defined in preferences.xml, arrays.xml, and strings.xml.
Default values are defined in strings.xml.

For example:

preferences.xml:
    <ListPreference
        android:key="notification_interval"
        android:title="@string/notification_interval_title"
        android:summary="@string/notification_interval_summary"
        android:dialogTitle="@string/
notification_interval_dialog_title"
        android:entries="@array/notification_interval_entries"
        android:entryValues="@array/notification_interval_values"
        android:defaultValue="@string/
notification_interval_default_value" />

arrays.xml:
    <string-array name="notification_interval_values">
        <item>24</item>
        <item>12</item>
        <item>8</item>
        <item>4</item>
        <item>2</item>
        <item>1</item>
    </string-array>

strings.xml:
    <string name="notification_interval_title">Notification Interval</
string>
    <string name="notification_interval_summary">How often to notify
that words/phrases are available to learn</string>
    <string name="notification_interval_dialog_title">Notification
Interval</string>
    <string name="notification_interval_default_value">Once A Day</
string>

Preferences are edited by:

public final class PreferencesEditor extends PreferenceActivity
{
    /**
     * @see android.preference.PreferenceActivity#onCreate
(android.os.Bundle)
     */
    @Override
    protected final void onCreate(final Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        addPreferencesFromResource(R.xml.preferences);
    }
}

Editing preferences works--user can set preferences, close the
preferences editor, return to the preferences, and see the values the
user set.

Then I wanted to add restoring preferences to default values.

I thought this code would do it:

    public final boolean onMenuItemSelected(final int featureId, final
MenuItem item)
    {
        switch (item.getItemId())
        {
            case RESTORE_DEFAULT_PREFERENCES_ID:
            {
                final Context context = getBaseContext();
                final SharedPreferences preferences =
                    PreferenceManager.getDefaultSharedPreferences
(context);
                final SharedPreferences.Editor preferencesEditor =
preferences.edit();
                preferencesEditor.clear();
                PreferenceManager.setDefaultValues(context,
R.xml.preferences, true);
                preferencesEditor.commit();
                return true;
            }
        }

It clears the preferences, but it doesn't restore the original default
values. Instead, all choices in the array are not selected.

What is the correct way to restore default values in preferences
defined in XML?
--~--~---------~--~----~------------~-------~--~----~

3. FreshBrain

4. ProgressBar to grow from middle

5. Who recovers the memory of allocateDirect of java nio buffers? (A helpful note)

6. Here is an approach to draw a regular polygon using Android OpenGL.

7. Adding a view to a viewgroup