Uploaded on

2012/1/28 …

2012/1/28
夜子まま塾ADKの資料です

More in: Technology , Business
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
1,460
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
10
Comments
0
Likes
3

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Now Loading. Please Wait ... Re:Kayo-System Co.,Ltd.2012 1 27
  • 2. Re:Kayo-System Co.,Ltd.2012 1 27
  • 3. Re:Kayo-System Co.,Ltd.2012 1 27
  • 4. Re:Kayo-System Co.,Ltd.2012 1 27
  • 5. Re:Kayo-System Co.,Ltd.2012 1 27
  • 6. Re:Kayo-System Co.,Ltd.2012 1 27
  • 7. Re:Kayo-System Co.,Ltd.2012 1 27
  • 8. Re:Kayo-System Co.,Ltd.2012 1 27
  • 9. Re:Kayo-System Co.,Ltd.2012 1 27
  • 10. Re:Kayo-System Co.,Ltd.2012 1 27
  • 11. Re:Kayo-System Co.,Ltd.2012 1 27
  • 12. Re:Kayo-System Co.,Ltd.2012 1 27
  • 13. Re:Kayo-System Co.,Ltd.2012 1 27
  • 14. Re:Kayo-System Co.,Ltd.2012 1 27
  • 15. Re:Kayo-System Co.,Ltd.2012 1 27
  • 16. Re:Kayo-System Co.,Ltd.2012 1 27
  • 17. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/ res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > </LinearLayout> Re:Kayo-System Co.,Ltd.2012 1 27
  • 18. Re:Kayo-System Co.,Ltd.2012 1 27
  • 19. Re:Kayo-System Co.,Ltd.2012 1 27
  • 20. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" android:orientation="vertical" > <Button android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Button" /> </LinearLayout> Re:Kayo-System Co.,Ltd.2012 1 27
  • 21. public static final class layout { public static final int control=0x7f030000; public static final int device_list=0x7f030001; public static final int device_name=0x7f030002; public static final int hoge=0x7f030003; public static final int main=0x7f030004; } Re:Kayo-System Co.,Ltd.2012 1 27
  • 22. public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button btn = (Button)findViewById(R.id.button1); } Re:Kayo-System Co.,Ltd.2012 1 27
  • 23. Re:Kayo-System Co.,Ltd.2012 1 27
  • 24. Re:Kayo-System Co.,Ltd.2012 1 27
  • 25. Re:Kayo-System Co.,Ltd.2012 1 27
  • 26. Re:Kayo-System Co.,Ltd.2012 1 27
  • 27. Button btn = (Button)findViewById(R.id.button1); btn.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // } }); Re:Kayo-System Co.,Ltd.2012 1 27
  • 28. Re:Kayo-System Co.,Ltd.2012 1 27
  • 29. Re:Kayo-System Co.,Ltd.2012 1 27
  • 30. Re:Kayo-System Co.,Ltd.2012 1 27
  • 31. Re:Kayo-System Co.,Ltd.2012 1 27
  • 32. Re:Kayo-System Co.,Ltd.2012 1 27
  • 33. Re:Kayo-System Co.,Ltd.2012 1 27
  • 34. Re:Kayo-System Co.,Ltd.2012 1 27
  • 35. Re:Kayo-System Co.,Ltd.2012 1 27
  • 36. Re:Kayo-System Co.,Ltd.2012 1 27
  • 37. Re:Kayo-System Co.,Ltd.2012 1 27
  • 38. Re:Kayo-System Co.,Ltd.2012 1 27
  • 39. Re:Kayo-System Co.,Ltd.2012 1 27
  • 40. Re:Kayo-System Co.,Ltd.2012 1 27
  • 41. Re:Kayo-System Co.,Ltd.2012 1 27
  • 42. Re:Kayo-System Co.,Ltd.2012 1 27
  • 43. Re:Kayo-System Co.,Ltd.2012 1 27
  • 44. Re:Kayo-System Co.,Ltd.2012 1 27
  • 45. Re:Kayo-System Co.,Ltd.2012 1 27
  • 46. Re:Kayo-System Co.,Ltd.2012 1 27
  • 47. Re:Kayo-System Co.,Ltd.2012 1 27
  • 48. Re:Kayo-System Co.,Ltd.2012 1 27
  • 49. Re:Kayo-System Co.,Ltd.2012 1 27
  • 50. Re:Kayo-System Co.,Ltd.2012 1 27
  • 51. Re:Kayo-System Co.,Ltd.2012 1 27
  • 52. Re:Kayo-System Co.,Ltd.2012 1 27
  • 53. Re:Kayo-System Co.,Ltd.2012 1 27
  • 54. Re:Kayo-System Co.,Ltd.2012 1 27
  • 55. Re:Kayo-System Co.,Ltd.2012 1 27
  • 56. Re:Kayo-System Co.,Ltd.2012 1 27
  • 57. Re:Kayo-System Co.,Ltd.2012 1 27
  • 58. Re:Kayo-System Co.,Ltd.2012 1 27
  • 59. Re:Kayo-System Co.,Ltd.2012 1 27
  • 60. Re:Kayo-System Co.,Ltd.2012 1 27
  • 61. <fragment android:id="@+id/fragment1" android:tag="ADK" android:layout_width="0dip" android:layout_height="0dip" android:name="jp.co.kayo.ykmjuku.andylib.component.ADKCompone nt" /> Re:Kayo-System Co.,Ltd.2012 1 27
  • 62. DeviceComponent mDevice; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); ToggleButton toggleButton1 = (ToggleButton)findViewById(R.id.toggleButton1); toggleButton1.setOnCheckedChangeListener(this); try { mDevice = ComponentHelper.getDevice(getSupportFragmentManager(), "ADK"); } catch (Exception e) { Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show(); } } Re:Kayo-System Co.,Ltd.2012 1 27
  • 63. public void onCheckedChanged(CompoundButton buttonView, final boolean isChecked) { if(mDevice!=null){ AndyCommand cmd = new AndyCommand( (byte) 0x03, (byte) 0x1B, new byte[] { isChecked?(byte)1:(byte)0 }); try { mDevice.sendCommand(cmd); } catch (IOException e) { Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show(); } } } Re:Kayo-System Co.,Ltd.2012 1 27
  • 64. <?xml version="1.0" encoding="utf-8"?> <resources> <usb-accessory manufacturer="Google, Inc." model="DemoKit" version="1.0" /> </resources> Re:Kayo-System Co.,Ltd.2012 1 27
  • 65. <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <activity android:name=".MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> <intent-filter> <action android:name="android.hardware.usb.action.USB_ACCESSORY_ATTACHED" /> </intent-filter> <meta-data android:name="android.hardware.usb.action.USB_ACCESSORY_ATTACHED" android:resource="@xml/accessory_filter" /> </activity> <uses-library android:name="com.android.future.usb.accessory"/> </application> Re:Kayo-System Co.,Ltd.2012 1 27
  • 66. Re:Kayo-System Co.,Ltd.2012 1 27
  • 67. Re:Kayo-System Co.,Ltd.2012 1 27