Create Remote in Android using ConsumerIrManager Android by Rajesh Kumar Sahanee - February 28, 2020April 4, 20200 Post Views: 5,158 Hello friends, today we are going to learn how to create remote in android using ConsumerIrManager. ConsumerIrManager class operates consumer infrared on the device and we’ll use two methods of ConsumerIrManager class hasIrEmitter method to check whether device has infrared emitter or not and transmit method to transmit single/pattern. Actually I have Clarion JM-8201 home theater and I have lost it’s remote and for that reason I was facing difficulties using it and I have tried many apps from playstore but no one worked for me so I decided to develop own remote app. Now I am sharing this code so that anyone else need it can benefit and If anyone have same home theater then s/he can use same code as it is to create their own remote for their home theater. So, Here is the code MainActivity.java MainActivity.java Java package com.zatackcoder.clarionremotejm8201; import androidx.annotation.RequiresApi; import androidx.appcompat.app.AppCompatActivity; import android.hardware.ConsumerIrManager; import android.os.Build; import android.os.Bundle; import android.view.View; import android.widget.Toast; public class MainActivity extends AppCompatActivity { Integer frequency = 33000; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } @RequiresApi(api = Build.VERSION_CODES.KITKAT) public void handleClick(View view) { ConsumerIrManager consumerIrManager = (ConsumerIrManager) getSystemService(CONSUMER_IR_SERVICE); if(!consumerIrManager.hasIrEmitter()) { Toast.makeText(getApplicationContext(), "IR Emitter Not Found in Your Device", Toast.LENGTH_LONG).show(); return; } switch (view.getId()) { case R.id.powerB: consumerIrManager.transmit(frequency, Btn.POWER); break; case R.id.inputB: consumerIrManager.transmit(frequency, Btn.INPUT); break; case R.id.usbB: consumerIrManager.transmit(frequency, Btn.USB); break; case R.id.sdB: consumerIrManager.transmit(frequency, Btn.SD); break; case R.id.fmB: consumerIrManager.transmit(frequency, Btn.FM); break; case R.id.auxB: consumerIrManager.transmit(frequency, Btn.AUX); break; case R.id.trebleMinusB: consumerIrManager.transmit(frequency, Btn.TREBLE_MINUS); break; case R.id.treblePlusB: consumerIrManager.transmit(frequency, Btn.TREBLE_PLUS); break; case R.id.bassMinusB: consumerIrManager.transmit(frequency, Btn.BASS_MINUS); break; case R.id.bassPlusB: consumerIrManager.transmit(frequency, Btn.BASS_PLUS); break; case R.id.stMinusB: consumerIrManager.transmit(frequency, Btn.ST_MINUS); break; case R.id.stPlusB: consumerIrManager.transmit(frequency, Btn.ST_PLUS); break; case R.id.prevB: consumerIrManager.transmit(frequency, Btn.PREVIOUS); break; case R.id.volMinusB: consumerIrManager.transmit(frequency, Btn.VOL_MINUS); break; case R.id.nextB: consumerIrManager.transmit(frequency, Btn.NEXT); break; case R.id.volPlusB: consumerIrManager.transmit(frequency, Btn.VOL_PLUS); break; case R.id.muteB: consumerIrManager.transmit(frequency, Btn.MUTE); break; case R.id.ftMinusB: consumerIrManager.transmit(frequency, Btn.FT_MINUS); break; case R.id.ftPlusB: consumerIrManager.transmit(frequency, Btn.FT_PLUS); break; case R.id.num1B: consumerIrManager.transmit(frequency, Btn.NUM_1); break; case R.id.num2B: consumerIrManager.transmit(frequency, Btn.NUM_2); break; case R.id.num3B: consumerIrManager.transmit(frequency, Btn.NUM_3); break; case R.id.num4B: consumerIrManager.transmit(frequency, Btn.NUM_4); break; case R.id.num5B: consumerIrManager.transmit(frequency, Btn.NUM_5); break; case R.id.num6B: consumerIrManager.transmit(frequency, Btn.NUM_6); break; case R.id.num7B: consumerIrManager.transmit(frequency, Btn.NUM_7); break; case R.id.num8B: consumerIrManager.transmit(frequency, Btn.NUM_8); break; case R.id.num9B: consumerIrManager.transmit(frequency, Btn.NUM_9); break; case R.id.num0B: consumerIrManager.transmit(frequency, Btn.NUM_0); break; case R.id.resetB: consumerIrManager.transmit(frequency, Btn.RESET); break; case R.id.searchB: consumerIrManager.transmit(frequency, Btn.SEARCH); break; } } } 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 package com.zatackcoder.clarionremotejm8201; import androidx.annotation.RequiresApi;import androidx.appcompat.app.AppCompatActivity; import android.hardware.ConsumerIrManager;import android.os.Build;import android.os.Bundle;import android.view.View;import android.widget.Toast; public class MainActivity extends AppCompatActivity { Integer frequency = 33000; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } @RequiresApi(api = Build.VERSION_CODES.KITKAT) public void handleClick(View view) { ConsumerIrManager consumerIrManager = (ConsumerIrManager) getSystemService(CONSUMER_IR_SERVICE); if(!consumerIrManager.hasIrEmitter()) { Toast.makeText(getApplicationContext(), "IR Emitter Not Found in Your Device", Toast.LENGTH_LONG).show(); return; } switch (view.getId()) { case R.id.powerB: consumerIrManager.transmit(frequency, Btn.POWER); break; case R.id.inputB: consumerIrManager.transmit(frequency, Btn.INPUT); break; case R.id.usbB: consumerIrManager.transmit(frequency, Btn.USB); break; case R.id.sdB: consumerIrManager.transmit(frequency, Btn.SD); break; case R.id.fmB: consumerIrManager.transmit(frequency, Btn.FM); break; case R.id.auxB: consumerIrManager.transmit(frequency, Btn.AUX); break; case R.id.trebleMinusB: consumerIrManager.transmit(frequency, Btn.TREBLE_MINUS); break; case R.id.treblePlusB: consumerIrManager.transmit(frequency, Btn.TREBLE_PLUS); break; case R.id.bassMinusB: consumerIrManager.transmit(frequency, Btn.BASS_MINUS); break; case R.id.bassPlusB: consumerIrManager.transmit(frequency, Btn.BASS_PLUS); break; case R.id.stMinusB: consumerIrManager.transmit(frequency, Btn.ST_MINUS); break; case R.id.stPlusB: consumerIrManager.transmit(frequency, Btn.ST_PLUS); break; case R.id.prevB: consumerIrManager.transmit(frequency, Btn.PREVIOUS); break; case R.id.volMinusB: consumerIrManager.transmit(frequency, Btn.VOL_MINUS); break; case R.id.nextB: consumerIrManager.transmit(frequency, Btn.NEXT); break; case R.id.volPlusB: consumerIrManager.transmit(frequency, Btn.VOL_PLUS); break; case R.id.muteB: consumerIrManager.transmit(frequency, Btn.MUTE); break; case R.id.ftMinusB: consumerIrManager.transmit(frequency, Btn.FT_MINUS); break; case R.id.ftPlusB: consumerIrManager.transmit(frequency, Btn.FT_PLUS); break; case R.id.num1B: consumerIrManager.transmit(frequency, Btn.NUM_1); break; case R.id.num2B: consumerIrManager.transmit(frequency, Btn.NUM_2); break; case R.id.num3B: consumerIrManager.transmit(frequency, Btn.NUM_3); break; case R.id.num4B: consumerIrManager.transmit(frequency, Btn.NUM_4); break; case R.id.num5B: consumerIrManager.transmit(frequency, Btn.NUM_5); break; case R.id.num6B: consumerIrManager.transmit(frequency, Btn.NUM_6); break; case R.id.num7B: consumerIrManager.transmit(frequency, Btn.NUM_7); break; case R.id.num8B: consumerIrManager.transmit(frequency, Btn.NUM_8); break; case R.id.num9B: consumerIrManager.transmit(frequency, Btn.NUM_9); break; case R.id.num0B: consumerIrManager.transmit(frequency, Btn.NUM_0); break; case R.id.resetB: consumerIrManager.transmit(frequency, Btn.RESET); break; case R.id.searchB: consumerIrManager.transmit(frequency, Btn.SEARCH); break; } }} activity_main.xml activity_main.xml XHTML <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:padding="16dp" android:weightSum="100" tools:context=".MainActivity"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="8dp" android:layout_weight="8" android:orientation="horizontal"> <Button android:id="@+id/powerB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:background="@drawable/ic_btn_round_red" android:onClick="handleClick" android:text="Power" android:textColor="#FFF" /> <View android:layout_width="wrap_content" android:layout_height="1dp" android:layout_weight="25" /> <Button android:id="@+id/inputB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:background="@drawable/ic_btn_round_green" android:onClick="handleClick" android:text="Input" android:textColor="#FFF" /> </LinearLayout> <LinearLayout android:id="@+id/linearLayout" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="16" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="0dp" android:orientation="horizontal"> <Button android:id="@+id/usbB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="USB" /> <Button android:id="@+id/sdB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="SD" /> <Button android:id="@+id/fmB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="FM" /> <Button android:id="@+id/auxB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="AUX" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="0dp" android:orientation="horizontal"> <Button android:id="@+id/trebleMinusB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="TREBLE-" /> <Button android:id="@+id/treblePlusB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="TREBLE+" /> <Button android:id="@+id/bassMinusB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="BASS-" /> <Button android:id="@+id/bassPlusB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="BASS+" /> </LinearLayout> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="40" android:gravity="center"> <GridLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:columnCount="3" android:rowCount="5"> <Button android:id="@+id/stMinusB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_row="0" android:layout_column="0" android:layout_columnWeight="1" android:layout_marginRight="20dp" android:onClick="handleClick" android:text="ST-" /> <Button android:id="@+id/stPlusB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_row="0" android:layout_column="2" android:layout_columnWeight="1" android:layout_marginLeft="20dp" android:onClick="handleClick" android:text="ST+" /> <Button android:id="@+id/prevB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_row="1" android:layout_column="1" android:layout_columnWeight="1" android:onClick="handleClick" android:text="PREV" /> <Button android:id="@+id/volMinusB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_row="2" android:layout_column="0" android:layout_columnWeight="1" android:onClick="handleClick" android:text="VOL-" /> <Button android:id="@+id/nextB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_row="3" android:layout_column="1" android:layout_columnWeight="1" android:onClick="handleClick" android:text="NEXT" /> <Button android:id="@+id/volPlusB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_row="2" android:layout_column="2" android:layout_columnWeight="1" android:onClick="handleClick" android:text="VOL+" /> <Button android:id="@+id/muteB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_row="2" android:layout_column="1" android:layout_columnWeight="1" android:onClick="handleClick" android:text="MUTE" /> <Button android:id="@+id/ftMinusB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_row="4" android:layout_column="0" android:layout_columnWeight="1" android:layout_marginRight="20dp" android:onClick="handleClick" android:text="FT-" /> <Button android:id="@+id/ftPlusB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_row="4" android:layout_column="2" android:layout_columnWeight="1" android:layout_marginLeft="20dp" android:onClick="handleClick" android:text="FT+" /> </GridLayout> </LinearLayout> <LinearLayout android:id="@+id/numbersLL" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="32" android:gravity="bottom" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <Button android:id="@+id/num1B" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="1" /> <Button android:id="@+id/num2B" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="2" /> <Button android:id="@+id/num3B" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="3" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <Button android:id="@+id/num4B" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="4" /> <Button android:id="@+id/num5B" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="5" /> <Button android:id="@+id/num6B" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="6" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <Button android:id="@+id/num7B" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="7" /> <Button android:id="@+id/num8B" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="8" /> <Button android:id="@+id/num9B" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="9" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <Button android:id="@+id/resetB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="Reset" /> <Button android:id="@+id/num0B" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="0" /> <Button android:id="@+id/searchB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="Search" /> </LinearLayout> </LinearLayout> </LinearLayout> 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378 <?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:padding="16dp" android:weightSum="100" tools:context=".MainActivity"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="8dp" android:layout_weight="8" android:orientation="horizontal"> <Button android:id="@+id/powerB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:background="@drawable/ic_btn_round_red" android:onClick="handleClick" android:text="Power" android:textColor="#FFF" /> <View android:layout_width="wrap_content" android:layout_height="1dp" android:layout_weight="25" /> <Button android:id="@+id/inputB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:background="@drawable/ic_btn_round_green" android:onClick="handleClick" android:text="Input" android:textColor="#FFF" /> </LinearLayout> <LinearLayout android:id="@+id/linearLayout" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="16" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="0dp" android:orientation="horizontal"> <Button android:id="@+id/usbB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="USB" /> <Button android:id="@+id/sdB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="SD" /> <Button android:id="@+id/fmB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="FM" /> <Button android:id="@+id/auxB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="AUX" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="0dp" android:orientation="horizontal"> <Button android:id="@+id/trebleMinusB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="TREBLE-" /> <Button android:id="@+id/treblePlusB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="TREBLE+" /> <Button android:id="@+id/bassMinusB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="BASS-" /> <Button android:id="@+id/bassPlusB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="BASS+" /> </LinearLayout> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="40" android:gravity="center"> <GridLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:columnCount="3" android:rowCount="5"> <Button android:id="@+id/stMinusB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_row="0" android:layout_column="0" android:layout_columnWeight="1" android:layout_marginRight="20dp" android:onClick="handleClick" android:text="ST-" /> <Button android:id="@+id/stPlusB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_row="0" android:layout_column="2" android:layout_columnWeight="1" android:layout_marginLeft="20dp" android:onClick="handleClick" android:text="ST+" /> <Button android:id="@+id/prevB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_row="1" android:layout_column="1" android:layout_columnWeight="1" android:onClick="handleClick" android:text="PREV" /> <Button android:id="@+id/volMinusB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_row="2" android:layout_column="0" android:layout_columnWeight="1" android:onClick="handleClick" android:text="VOL-" /> <Button android:id="@+id/nextB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_row="3" android:layout_column="1" android:layout_columnWeight="1" android:onClick="handleClick" android:text="NEXT" /> <Button android:id="@+id/volPlusB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_row="2" android:layout_column="2" android:layout_columnWeight="1" android:onClick="handleClick" android:text="VOL+" /> <Button android:id="@+id/muteB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_row="2" android:layout_column="1" android:layout_columnWeight="1" android:onClick="handleClick" android:text="MUTE" /> <Button android:id="@+id/ftMinusB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_row="4" android:layout_column="0" android:layout_columnWeight="1" android:layout_marginRight="20dp" android:onClick="handleClick" android:text="FT-" /> <Button android:id="@+id/ftPlusB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_row="4" android:layout_column="2" android:layout_columnWeight="1" android:layout_marginLeft="20dp" android:onClick="handleClick" android:text="FT+" /> </GridLayout> </LinearLayout> <LinearLayout android:id="@+id/numbersLL" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="32" android:gravity="bottom" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <Button android:id="@+id/num1B" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="1" /> <Button android:id="@+id/num2B" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="2" /> <Button android:id="@+id/num3B" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="3" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <Button android:id="@+id/num4B" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="4" /> <Button android:id="@+id/num5B" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="5" /> <Button android:id="@+id/num6B" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="6" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <Button android:id="@+id/num7B" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="7" /> <Button android:id="@+id/num8B" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="8" /> <Button android:id="@+id/num9B" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="9" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <Button android:id="@+id/resetB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="Reset" /> <Button android:id="@+id/num0B" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="0" /> <Button android:id="@+id/searchB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="handleClick" android:text="Search" /> </LinearLayout> </LinearLayout> </LinearLayout> Btn.java Btn.java Java package com.zatackcoder.clarionremotejm8201; public final class Btn { public static int[] POWER = {9000, 4450, 550, 600, 500, 600, 550, 600, 550, 550, 550, 600, 500, 600, 550, 1700, 550, 550, 550, 600, 550, 550, 550, 600, 550, 550, 550, 600, 550, 550, 550, 1700, 550, 600, 550, 1700, 550, 550, 550, 1700, 550, 1700, 550, 550, 550, 600, 550, 1700, 550, 550, 550, 600, 550, 1650, 600, 550, 550, 550, 600, 1650, 550, 1700, 550, 600, 550, 1700, 550}; public static int[] INPUT = {9050, 4450, 600, 550, 550, 550, 600, 550, 550, 550, 600, 550, 550, 550, 600, 1650, 550, 600, 550, 550, 550, 600, 500, 600, 550, 600, 550, 550, 550, 600, 550, 1700, 550, 550, 550, 1700, 550, 1700, 550, 550, 600, 550, 550, 550, 550, 600, 550, 1700, 550, 550, 550, 600, 550, 550, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550, 550, 550, 1700, 550}; public static int[] USB = {8950, 4500, 600, 550, 550, 550, 550, 600, 550, 550, 550, 600, 500, 600, 550, 1700, 550, 600, 550, 550, 550, 600, 550, 550, 550, 600, 550, 550, 550, 600, 550, 1650, 600, 550, 550, 1700, 550, 1700, 550, 550, 550, 600, 500, 1700, 600, 550, 550, 1600, 650, 550, 550, 600, 550, 550, 600, 1650, 550, 1700, 550, 600, 550, 1700, 550, 550, 550, 1700, 550}; public static int[] SD = {9000, 4450, 600, 550, 550, 550, 550, 600, 550, 550, 550, 600, 550, 550, 550, 1700, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 550, 550, 550, 600, 500, 1750, 550, 550, 550, 1700, 550, 1700, 550, 550, 550, 1700, 550, 1700, 550, 600, 550, 1700, 550, 550, 550, 550, 550, 600, 550, 1700, 550, 550, 550, 600, 550, 1700, 550, 550, 550, 1700, 550}; public static int[] FM = {8950, 4500, 550, 600, 500, 600, 550, 600, 550, 550, 550, 600, 550, 550, 550, 1700, 550, 600, 550, 550, 550, 600, 550, 550, 550, 600, 500, 600, 550, 550, 600, 1650, 600, 550, 550, 1700, 550, 1700, 550, 1700, 500, 600, 550, 1700, 550, 550, 550, 1700, 550, 600, 550, 550, 550, 600, 550, 550, 550, 1700, 550, 600, 550, 1700, 550, 550, 550, 1700, 550}; public static int[] AUX = {9000, 4500, 550, 550, 550, 600, 550, 550, 550, 600, 500, 600, 550, 600, 550, 1650, 550, 600, 550, 550, 600, 550, 550, 550, 550, 600, 550, 550, 600, 550, 550, 1700, 550, 550, 550, 600, 500, 600, 550, 1700, 550, 600, 550, 1700, 500, 600, 550, 1700, 550, 550, 550, 1700, 550, 1700, 550, 600, 500, 1750, 550, 550, 550, 1700, 550, 550, 550, 1700, 600}; public static int[] TREBLE_MINUS = {9000, 4500, 550, 550, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 550, 1700, 550, 550, 550, 550, 550, 600, 550, 550, 550, 600, 550, 550, 600, 550, 550, 1700, 550, 550, 550, 600, 550, 550, 550, 1700, 550, 1700, 550, 1700, 550, 550, 550, 600, 550, 550, 550, 1700, 550, 1700, 550, 600, 500, 600, 550, 600, 500, 1750, 500, 1750, 500, 1700, 600}; public static int[] TREBLE_PLUS = {8950, 4500, 600, 550, 550, 550, 600, 550, 550, 550, 600, 550, 500, 600, 550, 1700, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 500, 1750, 500, 600, 550, 600, 500, 1700, 600, 1650, 550, 1700, 550, 1700, 550, 600, 500, 600, 550, 600, 500, 1750, 550, 550, 550, 550, 550, 600, 550, 550, 600, 1650, 600, 1650, 550, 1700, 550}; public static int[] BASS_MINUS = {9000, 4500, 550, 550, 550, 600, 550, 550, 550, 600, 550, 550, 550, 600, 550, 1700, 550, 550, 550, 600, 550, 550, 550, 600, 500, 600, 550, 600, 550, 550, 550, 1700, 550, 550, 600, 1650, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550, 600, 550, 550, 550, 550, 600, 550, 550, 550, 600, 550, 550, 550, 600, 550, 550, 1700, 550, 1700, 550, 1700, 550}; public static int[] BASS_PLUS = {9000, 4500, 550, 550, 550, 600, 550, 550, 550, 600, 550, 550, 550, 600, 550, 1700, 550, 550, 550, 600, 500, 600, 550, 600, 550, 550, 550, 550, 600, 550, 550, 1700, 550, 550, 550, 1700, 550, 600, 550, 1700, 550, 550, 550, 1700, 550, 600, 500, 600, 550, 600, 500, 600, 550, 1700, 550, 550, 550, 1700, 550, 600, 500, 1750, 550, 1700, 550, 1650, 600}; public static int[] PREVIOUS = {9000, 4500, 550, 550, 550, 550, 600, 550, 550, 550, 550, 600, 550, 550, 550, 1700, 550, 600, 550, 550, 550, 600, 550, 550, 550, 600, 500, 600, 550, 550, 600, 1650, 600, 550, 550, 1700, 550, 1700, 550, 550, 550, 1700, 550, 550, 550, 600, 550, 550, 600, 550, 550, 550, 550, 600, 550, 1700, 550, 550, 550, 1700, 550, 1700, 550, 1700, 500, 1750, 550}; public static int[] NEXT = {9000, 4500, 550, 550, 550, 600, 500, 600, 550, 600, 550, 550, 550, 600, 550, 1700, 550, 550, 550, 550, 550, 600, 550, 550, 600, 550, 550, 550, 600, 550, 550, 1700, 550, 550, 550, 600, 500, 1750, 550, 1700, 550, 1650, 600, 550, 550, 550, 550, 600, 550, 550, 550, 1700, 550, 600, 500, 600, 550, 600, 550, 1650, 600, 1650, 550, 1700, 550, 1700, 550}; public static int[] VOL_MINUS = {8950, 4500, 550, 550, 600, 550, 550, 550, 600, 550, 550, 550, 550, 600, 550, 1700, 550, 550, 550, 600, 550, 550, 550, 600, 500, 600, 550, 600, 550, 550, 550, 1700, 550, 550, 550, 600, 550, 550, 550, 600, 500, 600, 550, 1700, 550, 600, 550, 550, 550, 600, 500, 1700, 600, 1650, 550, 1650, 600, 1700, 550, 600, 550, 1650, 600, 1650, 600, 1650, 550}; public static int[] VOL_PLUS = {8950, 4500, 550, 600, 500, 600, 550, 550, 550, 600, 550, 550, 600, 550, 550, 1700, 550, 550, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 550, 550, 550, 1700, 550, 550, 550, 1700, 550, 600, 500, 600, 550, 600, 550, 1700, 550, 550, 550, 600, 500, 600, 550, 600, 500, 1700, 550, 1700, 600, 1650, 550, 600, 550, 1700, 500, 1700, 600, 1650, 600}; public static int[] MUTE = {9000, 4450, 550, 600, 500, 600, 550, 600, 550, 550, 550, 600, 500, 600, 550, 1700, 550, 550, 550, 600, 550, 550, 550, 600, 550, 550, 550, 600, 500, 600, 550, 1700, 550, 550, 550, 1700, 550, 600, 550, 1700, 550, 1700, 550, 550, 550, 600, 550, 550, 550, 550, 550, 600, 550, 1700, 550, 550, 550, 600, 550, 1700, 550, 1700, 550, 1650, 550, 1700, 550}; public static int[] ST_MINUS = {8950, 4500, 550, 600, 550, 550, 550, 550, 550, 600, 550, 550, 550, 600, 550, 1700, 500, 600, 550, 600, 500, 600, 550, 600, 550, 550, 550, 600, 500, 600, 550, 1700, 550, 550, 550, 600, 550, 1700, 550, 550, 550, 1700, 550, 1700, 550, 600, 500, 600, 550, 550, 600, 1650, 600, 550, 550, 1700, 550, 550, 550, 600, 550, 1700, 550, 1650, 600, 1650, 550}; public static int[] ST_PLUS = {8950, 4500, 550, 600, 500, 600, 600, 550, 500, 600, 550, 600, 550, 550, 550, 1700, 550, 600, 550, 550, 550, 600, 550, 550, 550, 550, 600, 550, 550, 550, 600, 1650, 550, 600, 550, 550, 600, 1650, 600, 550, 500, 600, 550, 600, 500, 600, 550, 1700, 550, 550, 550, 1700, 550, 600, 500, 1750, 550, 1700, 550, 1700, 500, 1700, 600, 550, 550, 1700, 550}; public static int[] FT_MINUS = {9000, 4500, 550, 600, 550, 550, 550, 600, 550, 550, 550, 600, 550, 550, 550, 1700, 550, 600, 500, 600, 550, 600, 550, 550, 550, 600, 500, 600, 550, 600, 500, 1750, 550, 550, 550, 1700, 550, 550, 600, 1650, 600, 550, 550, 550, 600, 550, 550, 1700, 550, 550, 550, 600, 550, 1700, 550, 550, 550, 1700, 550, 1700, 550, 1700, 550, 600, 550, 1700, 550}; public static int[] FT_PLUS = {9000, 4500, 550, 550, 550, 600, 500, 600, 550, 600, 550, 550, 550, 600, 550, 1700, 550, 550, 550, 600, 500, 600, 550, 600, 550, 550, 550, 600, 550, 550, 550, 1700, 550, 600, 550, 550, 550, 600, 550, 1700, 550, 550, 550, 600, 550, 550, 550, 1700, 550, 600, 550, 1700, 550, 1650, 600, 550, 550, 1700, 550, 1700, 550, 1650, 600, 550, 550, 1700, 550}; public static int[] NUM_1 = {9000, 4500, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 500, 600, 550, 1700, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 500, 1750, 550, 550, 550, 1700, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 500, 600, 600, 1650, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550}; public static int[] NUM_2 = {9000, 4500, 600, 550, 550, 550, 550, 600, 550, 550, 600, 550, 550, 600, 500, 1700, 600, 550, 550, 550, 550, 600, 550, 600, 500, 600, 550, 600, 550, 550, 550, 1700, 550, 600, 500, 600, 550, 1700, 550, 600, 550, 550, 550, 600, 500, 600, 550, 600, 550, 550, 550, 1700, 550, 600, 500, 1750, 550, 1700, 500, 1750, 500, 1750, 500, 1700, 550, 1700, 550}; public static int[] NUM_3 = {9050, 4500, 550, 550, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 500, 1750, 500, 600, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 500, 600, 550, 1700, 550, 600, 500, 1750, 550, 1700, 500, 600, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 500, 1750, 500, 1750, 550, 1700, 500, 1750, 500, 1750, 500, 1750, 500}; public static int[] NUM_4 = {9000, 4500, 550, 600, 550, 550, 550, 600, 550, 550, 550, 600, 550, 550, 550, 1700, 550, 600, 500, 600, 550, 600, 550, 550, 600, 550, 550, 550, 600, 550, 550, 1700, 550, 550, 550, 600, 550, 600, 500, 1700, 550, 600, 550, 600, 500, 600, 550, 600, 550, 550, 550, 1700, 550, 1700, 550, 600, 500, 1750, 500, 1750, 500, 1750, 550, 1700, 550, 1700, 500}; public static int[] NUM_5 = {9000, 4500, 550, 550, 550, 600, 550, 550, 600, 550, 550, 550, 550, 600, 550, 1700, 550, 550, 550, 600, 550, 550, 550, 600, 550, 600, 550, 550, 550, 600, 500, 1750, 550, 550, 550, 1700, 550, 600, 500, 1750, 500, 600, 550, 600, 550, 550, 550, 600, 550, 550, 550, 600, 500, 1750, 500, 600, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550}; public static int[] NUM_6 = {9000, 4500, 550, 600, 550, 550, 550, 600, 500, 600, 550, 600, 500, 600, 550, 1700, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 550, 550, 550, 600, 500, 1750, 550, 550, 550, 600, 550, 1700, 550, 1700, 550, 550, 550, 600, 550, 550, 600, 550, 550, 550, 550, 1700, 550, 600, 550, 550, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550}; public static int[] NUM_7 = {9000, 4500, 550, 600, 550, 550, 550, 600, 500, 600, 550, 600, 550, 550, 550, 1700, 550, 600, 550, 550, 550, 600, 550, 550, 600, 550, 550, 550, 550, 600, 550, 1700, 550, 600, 500, 1750, 550, 1700, 500, 1700, 600, 550, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550}; public static int[] NUM_8 = {9050, 4500, 550, 550, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 500, 1750, 550, 550, 550, 600, 500, 600, 550, 600, 550, 550, 550, 600, 550, 550, 550, 1700, 600, 550, 550, 600, 500, 600, 550, 600, 500, 1750, 550, 550, 550, 600, 550, 550, 550, 600, 550, 1700, 550, 1550, 700, 1700, 550, 550, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550}; public static int[] NUM_9 = {9000, 4500, 550, 550, 550, 600, 550, 550, 550, 600, 550, 550, 550, 600, 550, 1700, 550, 550, 550, 600, 550, 550, 600, 550, 550, 550, 600, 550, 550, 550, 550, 1700, 600, 550, 550, 1700, 550, 550, 550, 600, 550, 1700, 550, 600, 500, 600, 550, 600, 550, 550, 550, 600, 500, 1750, 550, 1700, 500, 600, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550}; public static int[] NUM_0 = {9050, 4500, 550, 600, 550, 550, 550, 600, 500, 600, 550, 600, 500, 600, 550, 1700, 550, 600, 550, 550, 600, 550, 550, 550, 600, 550, 550, 600, 550, 550, 550, 1700, 550, 600, 500, 600, 600, 550, 500, 600, 550, 600, 550, 550, 600, 550, 550, 550, 600, 550, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550}; public static int[] RESET = {9050, 4500, 550, 550, 600, 550, 550, 600, 500, 600, 550, 600, 550, 550, 550, 1700, 550, 600, 550, 550, 550, 600, 550, 550, 550, 600, 550, 550, 600, 550, 550, 1700, 550, 600, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550, 550, 550, 600, 500, 600, 550, 600, 550, 550, 600, 550, 550, 550, 600, 550, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550}; public static int[] SEARCH = {9000, 4500, 550, 600, 550, 550, 550, 600, 500, 600, 550, 600, 550, 550, 550, 1700, 550, 600, 550, 550, 550, 600, 550, 550, 600, 550, 550, 550, 600, 550, 550, 1700, 550, 550, 550, 600, 550, 600, 550, 1700, 550, 1700, 550, 550, 550, 600, 550, 550, 550, 600, 550, 1700, 550, 1700, 550, 550, 550, 600, 500, 1750, 550, 1700, 550, 1700, 550, 1700, 550}; } 1234567891011121314151617181920212223242526272829303132333435 package com.zatackcoder.clarionremotejm8201; public final class Btn { public static int[] POWER = {9000, 4450, 550, 600, 500, 600, 550, 600, 550, 550, 550, 600, 500, 600, 550, 1700, 550, 550, 550, 600, 550, 550, 550, 600, 550, 550, 550, 600, 550, 550, 550, 1700, 550, 600, 550, 1700, 550, 550, 550, 1700, 550, 1700, 550, 550, 550, 600, 550, 1700, 550, 550, 550, 600, 550, 1650, 600, 550, 550, 550, 600, 1650, 550, 1700, 550, 600, 550, 1700, 550}; public static int[] INPUT = {9050, 4450, 600, 550, 550, 550, 600, 550, 550, 550, 600, 550, 550, 550, 600, 1650, 550, 600, 550, 550, 550, 600, 500, 600, 550, 600, 550, 550, 550, 600, 550, 1700, 550, 550, 550, 1700, 550, 1700, 550, 550, 600, 550, 550, 550, 550, 600, 550, 1700, 550, 550, 550, 600, 550, 550, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550, 550, 550, 1700, 550}; public static int[] USB = {8950, 4500, 600, 550, 550, 550, 550, 600, 550, 550, 550, 600, 500, 600, 550, 1700, 550, 600, 550, 550, 550, 600, 550, 550, 550, 600, 550, 550, 550, 600, 550, 1650, 600, 550, 550, 1700, 550, 1700, 550, 550, 550, 600, 500, 1700, 600, 550, 550, 1600, 650, 550, 550, 600, 550, 550, 600, 1650, 550, 1700, 550, 600, 550, 1700, 550, 550, 550, 1700, 550}; public static int[] SD = {9000, 4450, 600, 550, 550, 550, 550, 600, 550, 550, 550, 600, 550, 550, 550, 1700, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 550, 550, 550, 600, 500, 1750, 550, 550, 550, 1700, 550, 1700, 550, 550, 550, 1700, 550, 1700, 550, 600, 550, 1700, 550, 550, 550, 550, 550, 600, 550, 1700, 550, 550, 550, 600, 550, 1700, 550, 550, 550, 1700, 550}; public static int[] FM = {8950, 4500, 550, 600, 500, 600, 550, 600, 550, 550, 550, 600, 550, 550, 550, 1700, 550, 600, 550, 550, 550, 600, 550, 550, 550, 600, 500, 600, 550, 550, 600, 1650, 600, 550, 550, 1700, 550, 1700, 550, 1700, 500, 600, 550, 1700, 550, 550, 550, 1700, 550, 600, 550, 550, 550, 600, 550, 550, 550, 1700, 550, 600, 550, 1700, 550, 550, 550, 1700, 550}; public static int[] AUX = {9000, 4500, 550, 550, 550, 600, 550, 550, 550, 600, 500, 600, 550, 600, 550, 1650, 550, 600, 550, 550, 600, 550, 550, 550, 550, 600, 550, 550, 600, 550, 550, 1700, 550, 550, 550, 600, 500, 600, 550, 1700, 550, 600, 550, 1700, 500, 600, 550, 1700, 550, 550, 550, 1700, 550, 1700, 550, 600, 500, 1750, 550, 550, 550, 1700, 550, 550, 550, 1700, 600}; public static int[] TREBLE_MINUS = {9000, 4500, 550, 550, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 550, 1700, 550, 550, 550, 550, 550, 600, 550, 550, 550, 600, 550, 550, 600, 550, 550, 1700, 550, 550, 550, 600, 550, 550, 550, 1700, 550, 1700, 550, 1700, 550, 550, 550, 600, 550, 550, 550, 1700, 550, 1700, 550, 600, 500, 600, 550, 600, 500, 1750, 500, 1750, 500, 1700, 600}; public static int[] TREBLE_PLUS = {8950, 4500, 600, 550, 550, 550, 600, 550, 550, 550, 600, 550, 500, 600, 550, 1700, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 500, 1750, 500, 600, 550, 600, 500, 1700, 600, 1650, 550, 1700, 550, 1700, 550, 600, 500, 600, 550, 600, 500, 1750, 550, 550, 550, 550, 550, 600, 550, 550, 600, 1650, 600, 1650, 550, 1700, 550}; public static int[] BASS_MINUS = {9000, 4500, 550, 550, 550, 600, 550, 550, 550, 600, 550, 550, 550, 600, 550, 1700, 550, 550, 550, 600, 550, 550, 550, 600, 500, 600, 550, 600, 550, 550, 550, 1700, 550, 550, 600, 1650, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550, 600, 550, 550, 550, 550, 600, 550, 550, 550, 600, 550, 550, 550, 600, 550, 550, 1700, 550, 1700, 550, 1700, 550}; public static int[] BASS_PLUS = {9000, 4500, 550, 550, 550, 600, 550, 550, 550, 600, 550, 550, 550, 600, 550, 1700, 550, 550, 550, 600, 500, 600, 550, 600, 550, 550, 550, 550, 600, 550, 550, 1700, 550, 550, 550, 1700, 550, 600, 550, 1700, 550, 550, 550, 1700, 550, 600, 500, 600, 550, 600, 500, 600, 550, 1700, 550, 550, 550, 1700, 550, 600, 500, 1750, 550, 1700, 550, 1650, 600}; public static int[] PREVIOUS = {9000, 4500, 550, 550, 550, 550, 600, 550, 550, 550, 550, 600, 550, 550, 550, 1700, 550, 600, 550, 550, 550, 600, 550, 550, 550, 600, 500, 600, 550, 550, 600, 1650, 600, 550, 550, 1700, 550, 1700, 550, 550, 550, 1700, 550, 550, 550, 600, 550, 550, 600, 550, 550, 550, 550, 600, 550, 1700, 550, 550, 550, 1700, 550, 1700, 550, 1700, 500, 1750, 550}; public static int[] NEXT = {9000, 4500, 550, 550, 550, 600, 500, 600, 550, 600, 550, 550, 550, 600, 550, 1700, 550, 550, 550, 550, 550, 600, 550, 550, 600, 550, 550, 550, 600, 550, 550, 1700, 550, 550, 550, 600, 500, 1750, 550, 1700, 550, 1650, 600, 550, 550, 550, 550, 600, 550, 550, 550, 1700, 550, 600, 500, 600, 550, 600, 550, 1650, 600, 1650, 550, 1700, 550, 1700, 550}; public static int[] VOL_MINUS = {8950, 4500, 550, 550, 600, 550, 550, 550, 600, 550, 550, 550, 550, 600, 550, 1700, 550, 550, 550, 600, 550, 550, 550, 600, 500, 600, 550, 600, 550, 550, 550, 1700, 550, 550, 550, 600, 550, 550, 550, 600, 500, 600, 550, 1700, 550, 600, 550, 550, 550, 600, 500, 1700, 600, 1650, 550, 1650, 600, 1700, 550, 600, 550, 1650, 600, 1650, 600, 1650, 550}; public static int[] VOL_PLUS = {8950, 4500, 550, 600, 500, 600, 550, 550, 550, 600, 550, 550, 600, 550, 550, 1700, 550, 550, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 550, 550, 550, 1700, 550, 550, 550, 1700, 550, 600, 500, 600, 550, 600, 550, 1700, 550, 550, 550, 600, 500, 600, 550, 600, 500, 1700, 550, 1700, 600, 1650, 550, 600, 550, 1700, 500, 1700, 600, 1650, 600}; public static int[] MUTE = {9000, 4450, 550, 600, 500, 600, 550, 600, 550, 550, 550, 600, 500, 600, 550, 1700, 550, 550, 550, 600, 550, 550, 550, 600, 550, 550, 550, 600, 500, 600, 550, 1700, 550, 550, 550, 1700, 550, 600, 550, 1700, 550, 1700, 550, 550, 550, 600, 550, 550, 550, 550, 550, 600, 550, 1700, 550, 550, 550, 600, 550, 1700, 550, 1700, 550, 1650, 550, 1700, 550}; public static int[] ST_MINUS = {8950, 4500, 550, 600, 550, 550, 550, 550, 550, 600, 550, 550, 550, 600, 550, 1700, 500, 600, 550, 600, 500, 600, 550, 600, 550, 550, 550, 600, 500, 600, 550, 1700, 550, 550, 550, 600, 550, 1700, 550, 550, 550, 1700, 550, 1700, 550, 600, 500, 600, 550, 550, 600, 1650, 600, 550, 550, 1700, 550, 550, 550, 600, 550, 1700, 550, 1650, 600, 1650, 550}; public static int[] ST_PLUS = {8950, 4500, 550, 600, 500, 600, 600, 550, 500, 600, 550, 600, 550, 550, 550, 1700, 550, 600, 550, 550, 550, 600, 550, 550, 550, 550, 600, 550, 550, 550, 600, 1650, 550, 600, 550, 550, 600, 1650, 600, 550, 500, 600, 550, 600, 500, 600, 550, 1700, 550, 550, 550, 1700, 550, 600, 500, 1750, 550, 1700, 550, 1700, 500, 1700, 600, 550, 550, 1700, 550}; public static int[] FT_MINUS = {9000, 4500, 550, 600, 550, 550, 550, 600, 550, 550, 550, 600, 550, 550, 550, 1700, 550, 600, 500, 600, 550, 600, 550, 550, 550, 600, 500, 600, 550, 600, 500, 1750, 550, 550, 550, 1700, 550, 550, 600, 1650, 600, 550, 550, 550, 600, 550, 550, 1700, 550, 550, 550, 600, 550, 1700, 550, 550, 550, 1700, 550, 1700, 550, 1700, 550, 600, 550, 1700, 550}; public static int[] FT_PLUS = {9000, 4500, 550, 550, 550, 600, 500, 600, 550, 600, 550, 550, 550, 600, 550, 1700, 550, 550, 550, 600, 500, 600, 550, 600, 550, 550, 550, 600, 550, 550, 550, 1700, 550, 600, 550, 550, 550, 600, 550, 1700, 550, 550, 550, 600, 550, 550, 550, 1700, 550, 600, 550, 1700, 550, 1650, 600, 550, 550, 1700, 550, 1700, 550, 1650, 600, 550, 550, 1700, 550}; public static int[] NUM_1 = {9000, 4500, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 500, 600, 550, 1700, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 500, 1750, 550, 550, 550, 1700, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 500, 600, 600, 1650, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550}; public static int[] NUM_2 = {9000, 4500, 600, 550, 550, 550, 550, 600, 550, 550, 600, 550, 550, 600, 500, 1700, 600, 550, 550, 550, 550, 600, 550, 600, 500, 600, 550, 600, 550, 550, 550, 1700, 550, 600, 500, 600, 550, 1700, 550, 600, 550, 550, 550, 600, 500, 600, 550, 600, 550, 550, 550, 1700, 550, 600, 500, 1750, 550, 1700, 500, 1750, 500, 1750, 500, 1700, 550, 1700, 550}; public static int[] NUM_3 = {9050, 4500, 550, 550, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 500, 1750, 500, 600, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 500, 600, 550, 1700, 550, 600, 500, 1750, 550, 1700, 500, 600, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 500, 1750, 500, 1750, 550, 1700, 500, 1750, 500, 1750, 500, 1750, 500}; public static int[] NUM_4 = {9000, 4500, 550, 600, 550, 550, 550, 600, 550, 550, 550, 600, 550, 550, 550, 1700, 550, 600, 500, 600, 550, 600, 550, 550, 600, 550, 550, 550, 600, 550, 550, 1700, 550, 550, 550, 600, 550, 600, 500, 1700, 550, 600, 550, 600, 500, 600, 550, 600, 550, 550, 550, 1700, 550, 1700, 550, 600, 500, 1750, 500, 1750, 500, 1750, 550, 1700, 550, 1700, 500}; public static int[] NUM_5 = {9000, 4500, 550, 550, 550, 600, 550, 550, 600, 550, 550, 550, 550, 600, 550, 1700, 550, 550, 550, 600, 550, 550, 550, 600, 550, 600, 550, 550, 550, 600, 500, 1750, 550, 550, 550, 1700, 550, 600, 500, 1750, 500, 600, 550, 600, 550, 550, 550, 600, 550, 550, 550, 600, 500, 1750, 500, 600, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550}; public static int[] NUM_6 = {9000, 4500, 550, 600, 550, 550, 550, 600, 500, 600, 550, 600, 500, 600, 550, 1700, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 550, 550, 550, 600, 500, 1750, 550, 550, 550, 600, 550, 1700, 550, 1700, 550, 550, 550, 600, 550, 550, 600, 550, 550, 550, 550, 1700, 550, 600, 550, 550, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550}; public static int[] NUM_7 = {9000, 4500, 550, 600, 550, 550, 550, 600, 500, 600, 550, 600, 550, 550, 550, 1700, 550, 600, 550, 550, 550, 600, 550, 550, 600, 550, 550, 550, 550, 600, 550, 1700, 550, 600, 500, 1750, 550, 1700, 500, 1700, 600, 550, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550}; public static int[] NUM_8 = {9050, 4500, 550, 550, 550, 600, 500, 600, 550, 600, 500, 600, 550, 600, 500, 1750, 550, 550, 550, 600, 500, 600, 550, 600, 550, 550, 550, 600, 550, 550, 550, 1700, 600, 550, 550, 600, 500, 600, 550, 600, 500, 1750, 550, 550, 550, 600, 550, 550, 550, 600, 550, 1700, 550, 1550, 700, 1700, 550, 550, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550}; public static int[] NUM_9 = {9000, 4500, 550, 550, 550, 600, 550, 550, 550, 600, 550, 550, 550, 600, 550, 1700, 550, 550, 550, 600, 550, 550, 600, 550, 550, 550, 600, 550, 550, 550, 550, 1700, 600, 550, 550, 1700, 550, 550, 550, 600, 550, 1700, 550, 600, 500, 600, 550, 600, 550, 550, 550, 600, 500, 1750, 550, 1700, 500, 600, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550}; public static int[] NUM_0 = {9050, 4500, 550, 600, 550, 550, 550, 600, 500, 600, 550, 600, 500, 600, 550, 1700, 550, 600, 550, 550, 600, 550, 550, 550, 600, 550, 550, 600, 550, 550, 550, 1700, 550, 600, 500, 600, 600, 550, 500, 600, 550, 600, 550, 550, 600, 550, 550, 550, 600, 550, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550}; public static int[] RESET = {9050, 4500, 550, 550, 600, 550, 550, 600, 500, 600, 550, 600, 550, 550, 550, 1700, 550, 600, 550, 550, 550, 600, 550, 550, 550, 600, 550, 550, 600, 550, 550, 1700, 550, 600, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550, 550, 550, 600, 500, 600, 550, 600, 550, 550, 600, 550, 550, 550, 600, 550, 550, 1700, 550, 1700, 550, 1700, 550, 1700, 550}; public static int[] SEARCH = {9000, 4500, 550, 600, 550, 550, 550, 600, 500, 600, 550, 600, 550, 550, 550, 1700, 550, 600, 550, 550, 550, 600, 550, 550, 600, 550, 550, 550, 600, 550, 550, 1700, 550, 550, 550, 600, 550, 600, 550, 1700, 550, 1700, 550, 550, 550, 600, 550, 550, 550, 600, 550, 1700, 550, 1700, 550, 550, 550, 600, 500, 1750, 550, 1700, 550, 1700, 550, 1700, 550};} These button codes/patten I have extracted from actuall remote by the help of a shopkeeper using Arduino Uno and Infrared Sensor. styles.xml styles.xml <resources> <!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <!-- Customize your theme here. --> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> </style> </resources> 1234567891011 <resources> <!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <!-- Customize your theme here. --> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> </style> </resources> AndroidManifest.xml AndroidManifest.xml XHTML <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.zatackcoder.clarionremotejm8201"> <uses-permission android:name="android.permission.TRANSMIT_IR"/> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"> <activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest> 1234567891011121314151617181920212223 <?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.zatackcoder.clarionremotejm8201"> <uses-permission android:name="android.permission.TRANSMIT_IR"/> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"> <activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest> Screenshot AndroidStudio Project Download ClarionRemoteJM8201 AndroidStudio Project 1 file(s) 8.49 MB Download Thanks for Stoping by If you find this helpful then please do share