SlideShare a Scribd company logo
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

More Related Content

PPTX
Hope or Hype: A Look at the Next Generation of Identity Standards
PDF
OAuth 101 & Secure API's - Paul Madsen and Brian Campbell, Ping Identity
PDF
夜子まま塾講義3(androidで電卓アプリを作る)
PDF
Pastors as Brothers: How to Form Gospel-Centered Discipleship and Accountabil...
PPTX
Denver Startup Week '15: Mobile SSO
KEY
Chirp 2010: Too many secrets, but never enough: OAuth at Twitter
PDF
The Pastor as Minister: Facing the Unique Challenges of Ministry
PDF
Pastors as Disciples: Our Ongoing Need of the Grace of God in Sanctification
Hope or Hype: A Look at the Next Generation of Identity Standards
OAuth 101 & Secure API's - Paul Madsen and Brian Campbell, Ping Identity
夜子まま塾講義3(androidで電卓アプリを作る)
Pastors as Brothers: How to Form Gospel-Centered Discipleship and Accountabil...
Denver Startup Week '15: Mobile SSO
Chirp 2010: Too many secrets, but never enough: OAuth at Twitter
The Pastor as Minister: Facing the Unique Challenges of Ministry
Pastors as Disciples: Our Ongoing Need of the Grace of God in Sanctification

Similar to Andy lib解説 (20)

PDF
夜子まま塾Ecc
PDF
夜子まま塾さくら
PDF
夜子まま塾講義1(Javaでhello world)
PDF
夜子まま塾講義4(アプリを動かす)
ODP
Nagios Conference 2012 - Mike Weber - disaster
PDF
Stone edge modulesetup
PPTX
Full Stack Visualization: Build A React App With A Sankey Diagram
PDF
10 tips for Redux at scale
PDF
Redux at scale
PDF
Scaling Crashlytics: Building Analytics on Redis 2.6
PDF
AndroidからWebサービスを使う
PDF
Server side rendering with React and Symfony
PPTX
JMeter_ Cubet Seminar ppt
PDF
Getting the Most From Today's Java Tooling With Neo4j
PPTX
DevConfZA 2020 : Automating your cloud: What are the building blocks
DOCX
Setting up an odi agent
PDF
Case Study of Financial Web System Development and Operations with Oracle Web...
PPTX
IAM Deep Dive - Custom IAM Policies with Conditions
PDF
Workshop 4:The Modeling Process & Future Directions | Complex Systems Modelin...
PDF
Altinity Quickstart for ClickHouse
夜子まま塾Ecc
夜子まま塾さくら
夜子まま塾講義1(Javaでhello world)
夜子まま塾講義4(アプリを動かす)
Nagios Conference 2012 - Mike Weber - disaster
Stone edge modulesetup
Full Stack Visualization: Build A React App With A Sankey Diagram
10 tips for Redux at scale
Redux at scale
Scaling Crashlytics: Building Analytics on Redis 2.6
AndroidからWebサービスを使う
Server side rendering with React and Symfony
JMeter_ Cubet Seminar ppt
Getting the Most From Today's Java Tooling With Neo4j
DevConfZA 2020 : Automating your cloud: What are the building blocks
Setting up an odi agent
Case Study of Financial Web System Development and Operations with Oracle Web...
IAM Deep Dive - Custom IAM Policies with Conditions
Workshop 4:The Modeling Process & Future Directions | Complex Systems Modelin...
Altinity Quickstart for ClickHouse
Ad

More from Masafumi Terazono (20)

PDF
初心者向けSpigot開発
PPTX
Minecraft dayの報告
PPTX
BungeeCordeについて
PPTX
Spongeについて
PPTX
Kobe.py 勉強会 minecraft piスライド
PPTX
Minecraftと連携するSlackちゃんという会話Botを作った話
PDF
初心者〜中級者 Android StudioによるAndroid勉強会資料(スライド)
PDF
夜子まま塾 2015年1月23日 進行用資料
PDF
PDF
Android wear勉強会2
PDF
夜子まま塾@鹿児島
PDF
セーラーソン振り返り
PDF
関西Nfc lab勉強会 宣伝
PDF
関西支部 第二回 NFCLab勉強会 
PDF
日本Androidの会 中国支部資料
PDF
Android+NFC 日本Androidの会神戸支部 勉強会
PDF
関西支部Android勉強会(ロボットxnfc)
PDF
関西Unity勉強会
PDF
夜子まま塾講義12(broadcast reciever)
PDF
夜子まま塾講義11(暗黙的intent)
初心者向けSpigot開発
Minecraft dayの報告
BungeeCordeについて
Spongeについて
Kobe.py 勉強会 minecraft piスライド
Minecraftと連携するSlackちゃんという会話Botを作った話
初心者〜中級者 Android StudioによるAndroid勉強会資料(スライド)
夜子まま塾 2015年1月23日 進行用資料
Android wear勉強会2
夜子まま塾@鹿児島
セーラーソン振り返り
関西Nfc lab勉強会 宣伝
関西支部 第二回 NFCLab勉強会 
日本Androidの会 中国支部資料
Android+NFC 日本Androidの会神戸支部 勉強会
関西支部Android勉強会(ロボットxnfc)
関西Unity勉強会
夜子まま塾講義12(broadcast reciever)
夜子まま塾講義11(暗黙的intent)
Ad

Recently uploaded (20)

PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Spectroscopy.pptx food analysis technology
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Machine learning based COVID-19 study performance prediction
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
Big Data Technologies - Introduction.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Empathic Computing: Creating Shared Understanding
Per capita expenditure prediction using model stacking based on satellite ima...
Spectroscopy.pptx food analysis technology
Dropbox Q2 2025 Financial Results & Investor Presentation
Machine learning based COVID-19 study performance prediction
Reach Out and Touch Someone: Haptics and Empathic Computing
Spectral efficient network and resource selection model in 5G networks
sap open course for s4hana steps from ECC to s4
Big Data Technologies - Introduction.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
NewMind AI Weekly Chronicles - August'25 Week I
Programs and apps: productivity, graphics, security and other tools
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Encapsulation_ Review paper, used for researhc scholars
Chapter 3 Spatial Domain Image Processing.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Empathic Computing: Creating Shared Understanding

Andy lib解説