• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Andy lib解説
 

Andy lib解説

on

  • 1,705 views

2012/1/28

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

Statistics

Views

Total Views
1,705
Views on SlideShare
1,692
Embed Views
13

Actions

Likes
3
Downloads
10
Comments
0

4 Embeds 13

http://us-w1.rockmelt.com 7
http://wiki.onakasuita.org 4
http://a0.twimg.com 1
https://si0.twimg.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Andy lib解説 Andy lib解説 Presentation Transcript

    • Now Loading. Please Wait ... Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • <?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
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • <?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
    • 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
    • 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
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 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
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • <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
    • 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
    • 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
    • <?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
    • <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
    • Re:Kayo-System Co.,Ltd.2012 1 27
    • Re:Kayo-System Co.,Ltd.2012 1 27