fixed decode issues and could run on real device
This commit is contained in:
@@ -35,11 +35,11 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile files('libs/irext-web-api.jar')
|
|
||||||
compile 'com.android.support:appcompat-v7:25.3.1'
|
compile 'com.android.support:appcompat-v7:25.3.1'
|
||||||
compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4'
|
compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4'
|
||||||
compile 'com.android.support:design:25.3.1'
|
compile 'com.android.support:design:25.3.1'
|
||||||
compile 'com.android.support:support-v4:25.3.1'
|
compile 'com.android.support:support-v4:25.3.1'
|
||||||
compile 'com.michaelpardo:activeandroid:3.1.0-SNAPSHOT'
|
compile 'com.michaelpardo:activeandroid:3.1.0-SNAPSHOT'
|
||||||
compile project(':decodesdk')
|
compile project(':decodesdk')
|
||||||
|
compile files('libs/irext-web-api-0.1.1.jar')
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@@ -21,8 +21,8 @@ public class IRApplication extends com.activeandroid.app.Application {
|
|||||||
|
|
||||||
private static final String TAG = IRApplication.class.getSimpleName();
|
private static final String TAG = IRApplication.class.getSimpleName();
|
||||||
|
|
||||||
private static final String ADDRESS = "http://192.168.137.128:8080";
|
private static final String ADDRESS = "http://irext.net:8080";
|
||||||
private static final String APP_NAME = "/irext";
|
private static final String APP_NAME = "/irext-server";
|
||||||
|
|
||||||
public WebAPIs mWeAPIs = WebAPIs.getInstance(ADDRESS, APP_NAME);
|
public WebAPIs mWeAPIs = WebAPIs.getInstance(ADDRESS, APP_NAME);
|
||||||
|
|
||||||
|
|||||||
@@ -134,13 +134,12 @@ public class ControlFragment extends Fragment implements View.OnClickListener {
|
|||||||
mCurrentRemoteControl.getRemoteMap() + FileUtils.FILE_NAME_EXT;
|
mCurrentRemoteControl.getRemoteMap() + FileUtils.FILE_NAME_EXT;
|
||||||
|
|
||||||
/* decode SDK - load binary file */
|
/* decode SDK - load binary file */
|
||||||
// int ret = mIRDecode.openBinary(category, mCurrentRemoteControl.getSubCategory(), binFileName);
|
int ret = mIRDecode.openBinary(category, mCurrentRemoteControl.getSubCategory(), binFileName);
|
||||||
// Log.d(TAG, "open binary result = " + ret);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void closeIRBinary() {
|
public void closeIRBinary() {
|
||||||
// mIRDecode.closeBinary();
|
mIRDecode.closeBinary();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@@ -199,8 +198,7 @@ public class ControlFragment extends Fragment implements View.OnClickListener {
|
|||||||
/* translate key code for AC according to the mapping above */
|
/* translate key code for AC according to the mapping above */
|
||||||
/* ac status is useless for decoding devices other than AC, it's an optional parameter */
|
/* ac status is useless for decoding devices other than AC, it's an optional parameter */
|
||||||
/* change wind dir is an optional parameter, set to 0 as default */
|
/* change wind dir is an optional parameter, set to 0 as default */
|
||||||
// return mIRDecode.decodeBinary(inputKeyCode, acStatus, 0);
|
return mIRDecode.decodeBinary(inputKeyCode, acStatus, 0);
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// control
|
// control
|
||||||
@@ -257,9 +255,11 @@ public class ControlFragment extends Fragment implements View.OnClickListener {
|
|||||||
ConsumerIrManager irEmitter =
|
ConsumerIrManager irEmitter =
|
||||||
(ConsumerIrManager) mParent.getSystemService(Context.CONSUMER_IR_SERVICE);
|
(ConsumerIrManager) mParent.getSystemService(Context.CONSUMER_IR_SERVICE);
|
||||||
if (irEmitter.hasIrEmitter()) {
|
if (irEmitter.hasIrEmitter()) {
|
||||||
|
if (null != decoded && decoded.length > 0) {
|
||||||
irEmitter.transmit(38000, decoded);
|
irEmitter.transmit(38000, decoded);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static class MsgHandler extends Handler {
|
private static class MsgHandler extends Handler {
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -8,11 +8,6 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="64dp"
|
|
||||||
android:textSize="24sp"
|
|
||||||
android:gravity="center"/>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
BIN
Android/app/src/main/res/mipmap-xxhdpi/ir_logo.jpg
Normal file
BIN
Android/app/src/main/res/mipmap-xxhdpi/ir_logo.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 49 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 13 KiB |
Reference in New Issue
Block a user