diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/.classpath b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/.classpath deleted file mode 100644 index 0b08408342..0000000000 --- a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/.classpath +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/.project b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/.project deleted file mode 100644 index 09388ba603..0000000000 --- a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/.project +++ /dev/null @@ -1,33 +0,0 @@ - - - LUFA_AOA_Test - - - - - - com.android.ide.eclipse.adt.ResourceManagerBuilder - - - - - com.android.ide.eclipse.adt.PreCompilerBuilder - - - - - org.eclipse.jdt.core.javabuilder - - - - - com.android.ide.eclipse.adt.ApkBuilder - - - - - - com.android.ide.eclipse.adt.AndroidNature - org.eclipse.jdt.core.javanature - - diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/.settings/org.eclipse.jdt.core.prefs b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index b080d2ddc8..0000000000 --- a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.source=1.6 diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/AndroidHostApp.zip b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/AndroidHostApp.zip new file mode 100644 index 0000000000..c433d79e16 Binary files /dev/null and b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/AndroidHostApp.zip differ diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/AndroidManifest.xml b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/AndroidManifest.xml deleted file mode 100644 index ab57674513..0000000000 --- a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/AndroidManifest.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/AndroidManifest.xml b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/AndroidManifest.xml deleted file mode 100644 index ab57674513..0000000000 --- a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/AndroidManifest.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/BuildConfig.class b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/BuildConfig.class deleted file mode 100644 index ae1212efbc..0000000000 Binary files a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/BuildConfig.class and /dev/null differ diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/MainActivity.class b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/MainActivity.class deleted file mode 100644 index 0562efca9d..0000000000 Binary files a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/MainActivity.class and /dev/null differ diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/R$attr.class b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/R$attr.class deleted file mode 100644 index 1f85cf87e7..0000000000 Binary files a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/R$attr.class and /dev/null differ diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/R$dimen.class b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/R$dimen.class deleted file mode 100644 index 17323ef315..0000000000 Binary files a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/R$dimen.class and /dev/null differ diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/R$drawable.class b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/R$drawable.class deleted file mode 100644 index fd22775788..0000000000 Binary files a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/R$drawable.class and /dev/null differ diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/R$id.class b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/R$id.class deleted file mode 100644 index 2ec18315ba..0000000000 Binary files a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/R$id.class and /dev/null differ diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/R$layout.class b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/R$layout.class deleted file mode 100644 index 77835f24ce..0000000000 Binary files a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/R$layout.class and /dev/null differ diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/R$menu.class b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/R$menu.class deleted file mode 100644 index 695d0a809e..0000000000 Binary files a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/R$menu.class and /dev/null differ diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/R$string.class b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/R$string.class deleted file mode 100644 index 73a2d25dbb..0000000000 Binary files a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/R$string.class and /dev/null differ diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/R$style.class b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/R$style.class deleted file mode 100644 index ca51233b57..0000000000 Binary files a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/R$style.class and /dev/null differ diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/R$xml.class b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/R$xml.class deleted file mode 100644 index 3671c14497..0000000000 Binary files a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/R$xml.class and /dev/null differ diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/R.class b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/R.class deleted file mode 100644 index 8febfbe299..0000000000 Binary files a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/classes/com/example/lufa_aoa_test/R.class and /dev/null differ diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/jarlist.cache b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/jarlist.cache deleted file mode 100644 index 0565465f22..0000000000 --- a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/bin/jarlist.cache +++ /dev/null @@ -1,3 +0,0 @@ -# cache for current jar dependency. DO NOT EDIT. -# format is -# Encoding is UTF-8 diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/gen/com/example/lufa_aoa_test/BuildConfig.java b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/gen/com/example/lufa_aoa_test/BuildConfig.java deleted file mode 100644 index 80f18ec2db..0000000000 --- a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/gen/com/example/lufa_aoa_test/BuildConfig.java +++ /dev/null @@ -1,6 +0,0 @@ -/** Automatically generated file. DO NOT MODIFY */ -package com.example.lufa_aoa_test; - -public final class BuildConfig { - public final static boolean DEBUG = true; -} \ No newline at end of file diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/gen/com/example/lufa_aoa_test/R.java b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/gen/com/example/lufa_aoa_test/R.java deleted file mode 100644 index 367b897282..0000000000 --- a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/gen/com/example/lufa_aoa_test/R.java +++ /dev/null @@ -1,71 +0,0 @@ -/* AUTO-GENERATED FILE. DO NOT MODIFY. - * - * This class was automatically generated by the - * aapt tool from the resource data it found. It - * should not be modified by hand. - */ - -package com.example.lufa_aoa_test; - -public final class R { - public static final class attr { - } - public static final class dimen { - /** Default screen margins, per the Android Design guidelines. - - Customize dimensions originally defined in res/values/dimens.xml (such as - screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here. - - */ - public static final int activity_horizontal_margin=0x7f050000; - public static final int activity_vertical_margin=0x7f050001; - } - public static final class drawable { - public static final int ic_launcher=0x7f020000; - } - public static final class id { - public static final int action_settings=0x7f090001; - public static final int toggleButton1=0x7f090000; - } - public static final class layout { - public static final int activity_main=0x7f030000; - } - public static final class menu { - public static final int main=0x7f080000; - } - public static final class string { - public static final int action_settings=0x7f060001; - public static final int app_name=0x7f060000; - } - public static final class style { - /** - Base application theme, dependent on API level. This theme is replaced - by AppBaseTheme from res/values-vXX/styles.xml on newer devices. - - - Theme customizations available in newer API levels can go in - res/values-vXX/styles.xml, while customizations related to - backward-compatibility can go here. - - - Base application theme for API 11+. This theme completely replaces - AppBaseTheme from res/values/styles.xml on API 11+ devices. - - API 11 theme customizations can go here. - - Base application theme for API 14+. This theme completely replaces - AppBaseTheme from BOTH res/values/styles.xml and - res/values-v11/styles.xml on API 14+ devices. - - API 14 theme customizations can go here. - */ - public static final int AppBaseTheme=0x7f070000; - /** Application theme. - All customizations that are NOT specific to a particular API-level can go here. - */ - public static final int AppTheme=0x7f070001; - } - public static final class xml { - public static final int accessory_filter=0x7f040000; - } -} diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/ic_launcher-web.png b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/ic_launcher-web.png deleted file mode 100644 index a5852ba575..0000000000 Binary files a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/ic_launcher-web.png and /dev/null differ diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/libs/android-support-v4.jar b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/libs/android-support-v4.jar deleted file mode 100644 index 65ebaf8dc3..0000000000 Binary files a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/libs/android-support-v4.jar and /dev/null differ diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/project.properties b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/project.properties deleted file mode 100644 index 0c9830a3b0..0000000000 --- a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/project.properties +++ /dev/null @@ -1,14 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system edit -# "ant.properties", and override values to adapt the script to your -# project structure. -# -# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): -#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt - -# Project target. -target=Google Inc.:Google APIs:17 diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/drawable-hdpi/ic_launcher.png b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/drawable-hdpi/ic_launcher.png deleted file mode 100644 index 004688dfb0..0000000000 Binary files a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/drawable-hdpi/ic_launcher.png and /dev/null differ diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/drawable-mdpi/ic_launcher.png b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/drawable-mdpi/ic_launcher.png deleted file mode 100644 index 207afa8bcf..0000000000 Binary files a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/drawable-mdpi/ic_launcher.png and /dev/null differ diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/drawable-xhdpi/ic_launcher.png b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/drawable-xhdpi/ic_launcher.png deleted file mode 100644 index 8d8d79c9a8..0000000000 Binary files a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/drawable-xhdpi/ic_launcher.png and /dev/null differ diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/drawable-xxhdpi/ic_launcher.png b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/drawable-xxhdpi/ic_launcher.png deleted file mode 100644 index 82e2242028..0000000000 Binary files a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/drawable-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/layout/activity_main.xml b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/layout/activity_main.xml deleted file mode 100644 index f24e9986e8..0000000000 --- a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/layout/activity_main.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/menu/main.xml b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/menu/main.xml deleted file mode 100644 index d227c4927c..0000000000 --- a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/menu/main.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - \ No newline at end of file diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/values-sw600dp/dimens.xml b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/values-sw600dp/dimens.xml deleted file mode 100644 index 1ba777d65d..0000000000 --- a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/values-sw600dp/dimens.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - \ No newline at end of file diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/values-sw720dp-land/dimens.xml b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/values-sw720dp-land/dimens.xml deleted file mode 100644 index eee741a510..0000000000 --- a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/values-sw720dp-land/dimens.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - 128dp - - \ No newline at end of file diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/values-v11/styles.xml b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/values-v11/styles.xml deleted file mode 100644 index 541752f6ed..0000000000 --- a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/values-v11/styles.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/values-v14/styles.xml b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/values-v14/styles.xml deleted file mode 100644 index f20e01501d..0000000000 --- a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/values-v14/styles.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/values/dimens.xml b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/values/dimens.xml deleted file mode 100644 index a6dd14032e..0000000000 --- a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/values/dimens.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - 16dp - 16dp - - \ No newline at end of file diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/values/strings.xml b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/values/strings.xml deleted file mode 100644 index 2593f602f2..0000000000 --- a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/values/strings.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - LUFA AOA Example - Settings - - \ No newline at end of file diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/values/styles.xml b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/values/styles.xml deleted file mode 100644 index 4a10ca492d..0000000000 --- a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/values/styles.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/xml/accessory_filter.xml b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/xml/accessory_filter.xml deleted file mode 100644 index acf6c6192f..0000000000 --- a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/res/xml/accessory_filter.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/src/com/example/lufa_aoa_test/MainActivity.java b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/src/com/example/lufa_aoa_test/MainActivity.java deleted file mode 100644 index e5587632ad..0000000000 --- a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidHostApp/src/com/example/lufa_aoa_test/MainActivity.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.example.lufa_aoa_test; - -import java.io.FileDescriptor; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; - -import android.os.Bundle; -import android.os.ParcelFileDescriptor; -import android.app.Activity; -import android.content.Intent; -import android.view.Menu; -import android.view.View; -import android.widget.*; -import com.android.future.usb.*; - -public class MainActivity extends Activity { - private UsbManager mUSBManager; - private UsbAccessory mAccessoryDevice; - private ParcelFileDescriptor mFileDescriptor; - private FileInputStream mInputStream; - private FileOutputStream mOutputStream; - - public void changeLEDState(View v) { - boolean newButtonState = ((ToggleButton)v).isChecked(); - - if (mOutputStream != null) { - try { - mOutputStream.write(newButtonState ? 0x01 : 0x00); - } - catch (IOException e) - { - - } - } - } - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_main); - - Intent intent = getIntent(); - - if ((intent != null) && (intent.getAction() == com.android.future.usb.UsbManager.ACTION_USB_ACCESSORY_ATTACHED)) - { - mUSBManager = UsbManager.getInstance(this); - if (mUSBManager != null) - { - mAccessoryDevice = UsbManager.getAccessory(intent); - mFileDescriptor = mUSBManager.openAccessory(mAccessoryDevice); - - FileDescriptor fd = mFileDescriptor.getFileDescriptor(); - mInputStream = new FileInputStream(fd); - mOutputStream = new FileOutputStream(fd); - } - } - } - - - @Override - public boolean onCreateOptionsMenu(Menu menu) { - // Inflate the menu; this adds items to the action bar if it is present. - getMenuInflater().inflate(R.menu.main, menu); - return true; - } - -}