updated android-example to 1.5.0 latest
This commit is contained in:
BIN
android-example/app/app/release/app-app-release.apk
Normal file
BIN
android-example/app/app/release/app-app-release.apk
Normal file
Binary file not shown.
20
android-example/app/app/release/output-metadata.json
Normal file
20
android-example/app/app/release/output-metadata.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"version": 3,
|
||||
"artifactType": {
|
||||
"type": "APK",
|
||||
"kind": "Directory"
|
||||
},
|
||||
"applicationId": "net.irext.ircontrol",
|
||||
"variantName": "appRelease",
|
||||
"elements": [
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 7,
|
||||
"versionName": "1.5.0",
|
||||
"outputFile": "app-app-release.apk"
|
||||
}
|
||||
],
|
||||
"elementType": "File"
|
||||
}
|
||||
@@ -1,13 +1,13 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
compileSdk 36
|
||||
defaultConfig {
|
||||
applicationId "net.irext.ircontrol"
|
||||
minSdkVersion 19
|
||||
targetSdkVersion 28
|
||||
versionCode 6
|
||||
versionName '0.2.4'
|
||||
targetSdkVersion 36
|
||||
minSdkVersion 26
|
||||
versionCode 7
|
||||
versionName '1.5.0'
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
@@ -15,25 +15,35 @@ android {
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
sourceSets.main {
|
||||
jniLibs.srcDirs = ['src/main/jniLibs']
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
|
||||
}
|
||||
compileOptions {
|
||||
}
|
||||
|
||||
flavorDimensions = ['app']
|
||||
|
||||
productFlavors {
|
||||
app {
|
||||
ndk {
|
||||
abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
|
||||
}
|
||||
}
|
||||
}
|
||||
namespace 'net.irext.ircontrol'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(':decodesdk')
|
||||
implementation project(':web-api')
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation fileTree(dir: 'libs', include: ['*.aar'])
|
||||
|
||||
implementation 'com.android.support:appcompat-v7:28.0.0'
|
||||
implementation 'com.android.support:design:28.0.0'
|
||||
implementation 'com.android.support:support-v4:28.0.0'
|
||||
implementation 'com.michaelpardo:activeandroid:3.1.0-SNAPSHOT'
|
||||
implementation project(':decodesdk')
|
||||
implementation project(':web-api')
|
||||
|
||||
implementation 'com.android.support:multidex:1.0.3'
|
||||
|
||||
}
|
||||
BIN
android-example/app/libs/activeandroid-3.1.0.jar
Normal file
BIN
android-example/app/libs/activeandroid-3.1.0.jar
Normal file
Binary file not shown.
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
@@ -15,12 +14,14 @@
|
||||
android:icon="@mipmap/ir_logo"
|
||||
android:label="@string/app_name"
|
||||
android:supportsRtl="true"
|
||||
android:requestLegacyExternalStorage="true"
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
android:theme="@android:style/Theme.Holo.Light.DarkActionBar">
|
||||
|
||||
<activity
|
||||
android:name="net.irext.ircontrol.ui.activity.MainActivity"
|
||||
android:label="@string/title_activity_main"
|
||||
android:exported="true"
|
||||
android:theme="@style/AppTheme">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
|
||||
@@ -71,4 +71,8 @@ public class IRApplication extends com.activeandroid.app.Application {
|
||||
}
|
||||
}.start();
|
||||
}
|
||||
|
||||
public static String getApplicationName() {
|
||||
return IRApplication.class.getPackageName();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,16 +11,20 @@ import android.support.annotation.NonNull;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
import android.support.v4.app.ActivityCompat;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.util.Log;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
import net.irext.ircontrol.R;
|
||||
import net.irext.ircontrol.bean.RemoteControl;
|
||||
import net.irext.ircontrol.ui.fragment.MainFragment;
|
||||
import net.irext.ircontrol.utils.MessageUtil;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Filename: MainActivity.java
|
||||
@@ -37,6 +41,11 @@ public class MainActivity extends AppCompatActivity {
|
||||
|
||||
private static final String TAG = MainActivity.class.getSimpleName();
|
||||
|
||||
private boolean mReadPermissionGranted = false;
|
||||
|
||||
private boolean mWritePermissionGranted = false;
|
||||
private static final int PERMISSIONS_REQUEST_STORAGE = 1001;
|
||||
|
||||
public static final int CMD_GOTO_CONTROL = 0;
|
||||
|
||||
private RemoteControl mCurrentRemoteControl;
|
||||
@@ -62,6 +71,7 @@ public class MainActivity extends AppCompatActivity {
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
initView();
|
||||
checkAndRequestStoragePermissions();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -98,49 +108,64 @@ public class MainActivity extends AppCompatActivity {
|
||||
gotoCreateNew();
|
||||
}
|
||||
});
|
||||
isReadStoragePermissionGranted();
|
||||
isWriteStoragePermissionGranted();
|
||||
}
|
||||
|
||||
public void isReadStoragePermissionGranted() {
|
||||
if (Build.VERSION.SDK_INT >= 23) {
|
||||
if (checkSelfPermission(Manifest.permission.READ_EXTERNAL_STORAGE)
|
||||
== PackageManager.PERMISSION_GRANTED) {
|
||||
Log.v(TAG,"read permission is granted");
|
||||
private void checkAndRequestStoragePermissions() {
|
||||
boolean readGranted = ContextCompat.checkSelfPermission(this,
|
||||
Manifest.permission.READ_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED;
|
||||
boolean writeGranted = ContextCompat.checkSelfPermission(this,
|
||||
Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED;
|
||||
|
||||
List<String> permissionsToRequest = new ArrayList<>();
|
||||
|
||||
if (!readGranted) {
|
||||
permissionsToRequest.add(Manifest.permission.READ_EXTERNAL_STORAGE);
|
||||
Log.w(TAG, "read external storage permission not granted");
|
||||
}
|
||||
|
||||
if (!writeGranted) {
|
||||
permissionsToRequest.add(Manifest.permission.WRITE_EXTERNAL_STORAGE);
|
||||
Log.w(TAG, "write external storage permission not granted");
|
||||
}
|
||||
|
||||
if (!permissionsToRequest.isEmpty()) {
|
||||
Log.d(TAG, "requesting permission: " + String.join(", ", permissionsToRequest));
|
||||
ActivityCompat.requestPermissions(this,
|
||||
permissionsToRequest.toArray(new String[0]),
|
||||
PERMISSIONS_REQUEST_STORAGE);
|
||||
} else {
|
||||
|
||||
Log.v(TAG,"read permission is revoked");
|
||||
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, 3);
|
||||
}
|
||||
}
|
||||
else { //permission is automatically granted on sdk<23 upon installation
|
||||
Log.v(TAG,"read permission is granted");
|
||||
Log.i(TAG, "storage permissions already granted.");
|
||||
mReadPermissionGranted = true;
|
||||
mWritePermissionGranted = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void isWriteStoragePermissionGranted() {
|
||||
if (Build.VERSION.SDK_INT >= 23) {
|
||||
if (checkSelfPermission(android.Manifest.permission.WRITE_EXTERNAL_STORAGE)
|
||||
== PackageManager.PERMISSION_GRANTED) {
|
||||
Log.v(TAG,"write permission is granted");
|
||||
} else {
|
||||
|
||||
Log.v(TAG,"write permission is revoked");
|
||||
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 2);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// permission is automatically granted on sdk<23 upon installation
|
||||
Log.v(TAG,"write permission is granted");
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
|
||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||
if (requestCode == PERMISSIONS_REQUEST_STORAGE) {
|
||||
Log.d(TAG, "storage permission requested successfully");
|
||||
mReadPermissionGranted = true;
|
||||
mWritePermissionGranted = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void gotoCreateNew() {
|
||||
if (!mReadPermissionGranted || !mWritePermissionGranted) {
|
||||
Log.e(TAG, "storage read and write permission not granted");
|
||||
Toast.makeText(this, this.getString(R.string.storage_permission_warning), Toast.LENGTH_SHORT).show();
|
||||
checkAndRequestStoragePermissions();
|
||||
}
|
||||
Intent intent = new Intent(this, CreateActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
private void gotoControl() {
|
||||
if (!mReadPermissionGranted || !mWritePermissionGranted) {
|
||||
Log.e(TAG, "storage read and write permission not granted");
|
||||
Toast.makeText(this, this.getString(R.string.storage_permission_warning), Toast.LENGTH_SHORT).show();
|
||||
checkAndRequestStoragePermissions();
|
||||
}
|
||||
Intent intent = new Intent(this, ControlActivity.class);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putLong(ControlActivity.KEY_REMOTE_ID, mCurrentRemoteControl.getID());
|
||||
@@ -167,10 +192,4 @@ public class MainActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,
|
||||
@NonNull int[] grantResults) {
|
||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ public class ControlFragment extends Fragment implements View.OnClickListener {
|
||||
mCurrentRemoteControl = RemoteControl.getRemoteControl(mRemoteID);
|
||||
if (null != mCurrentRemoteControl) {
|
||||
int category = mCurrentRemoteControl.getCategoryId();
|
||||
String binFileName = FileUtils.BIN_PATH + FileUtils.FILE_NAME_PREFIX +
|
||||
String binFileName = FileUtils.binDir + FileUtils.FILE_NAME_PREFIX +
|
||||
mCurrentRemoteControl.getRemoteMap() + FileUtils.FILE_NAME_EXT;
|
||||
|
||||
/* decode SDK - load binary file */
|
||||
@@ -234,6 +234,14 @@ public class ControlFragment extends Fragment implements View.OnClickListener {
|
||||
} else if (id == R.id.iv_menu) {
|
||||
decoded = irControl(KEY_MENU);
|
||||
}
|
||||
|
||||
// debug decoded value
|
||||
String decodedValue = "";
|
||||
for (int i = 0; i < decoded.length; i++) {
|
||||
decodedValue += decoded[i];
|
||||
decodedValue += ",";
|
||||
}
|
||||
Log.d(TAG, "decodedValue : " + decodedValue);
|
||||
// send decoded integer array to IR emitter
|
||||
ConsumerIrManager irEmitter =
|
||||
(ConsumerIrManager) mParent.getSystemService(Context.CONSUMER_IR_SERVICE);
|
||||
|
||||
@@ -145,10 +145,11 @@ public class IndexFragment extends BaseCreateFragment {
|
||||
}
|
||||
|
||||
private boolean createDirectory() {
|
||||
File file = new File(FileUtils.BIN_PATH);
|
||||
File file = new File(FileUtils.binDir);
|
||||
if (file.exists()) {
|
||||
return true;
|
||||
}
|
||||
Log.d(TAG, "create directory : " + file.getAbsolutePath());
|
||||
return file.mkdirs();
|
||||
}
|
||||
|
||||
@@ -157,7 +158,7 @@ public class IndexFragment extends BaseCreateFragment {
|
||||
@Override
|
||||
public void run() {
|
||||
if (createDirectory()) {
|
||||
File binFile = new File(FileUtils.BIN_PATH +
|
||||
File binFile = new File(FileUtils.binDir +
|
||||
FileUtils.FILE_NAME_PREFIX + mCurrentIndex.getRemoteMap() +
|
||||
FileUtils.FILE_NAME_EXT);
|
||||
boolean ret = FileUtils.write(binFile, mBinStream);
|
||||
|
||||
@@ -2,6 +2,7 @@ package net.irext.ircontrol.utils;
|
||||
|
||||
import android.os.Environment;
|
||||
import android.util.Log;
|
||||
import net.irext.ircontrol.IRApplication;
|
||||
|
||||
import java.io.*;
|
||||
|
||||
@@ -20,9 +21,9 @@ public class FileUtils {
|
||||
|
||||
private static final String TAG = FileUtils.class.getSimpleName();
|
||||
|
||||
public static final String BASE_PATH = Environment.getExternalStorageDirectory() + File.separator +
|
||||
"irext" + File.separator;
|
||||
public static final String BIN_PATH = BASE_PATH + "bin" + File.separator;
|
||||
public static final String packageDataDir = Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator +
|
||||
Environment.DIRECTORY_DOWNLOADS + File.separator + IRApplication.getApplicationName() + File.separator;
|
||||
public static final String binDir = packageDataDir + "bin" + File.separator;
|
||||
|
||||
public static final String FILE_NAME_PREFIX = "irext_";
|
||||
public static final String FILE_NAME_EXT = ".ir";
|
||||
@@ -64,36 +65,15 @@ public class FileUtils {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static File createBinaryFile(String fileName) {
|
||||
if(createDirs(BASE_PATH) && createDirs(BIN_PATH)) {
|
||||
String path = BIN_PATH + fileName;
|
||||
File file = new File(path);
|
||||
if (!file.exists()) {
|
||||
try {
|
||||
if (file.createNewFile()) {
|
||||
return file;
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
Log.w(TAG, "binary file already exists ?");
|
||||
}
|
||||
} else {
|
||||
Log.e(TAG, "failed to create dirs");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static boolean createDirs(String path) {
|
||||
File file = new File(path);
|
||||
return file.exists() || file.mkdir();
|
||||
}
|
||||
|
||||
public static File getLocalFile(String fileName) {
|
||||
File file = new File(BIN_PATH);
|
||||
File file = new File(binDir);
|
||||
if (file.exists()) {
|
||||
String path = BIN_PATH + fileName;
|
||||
String path = binDir + fileName;
|
||||
file = new File(path);
|
||||
if (file.exists()) {
|
||||
return file;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package net.irext.iris.utils;
|
||||
package net.irext.ircontrol.utils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.widget.Toast;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 951 B |
Binary file not shown.
|
Before Width: | Height: | Size: 661 B |
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.8 KiB |
@@ -11,6 +11,7 @@
|
||||
|
||||
<!-- Main UI -->
|
||||
<string name="create_new">点击 + 安装遥控</string>
|
||||
<string name="storage_permission_warning">请先授权应用对存储进行读写</string>
|
||||
|
||||
<!-- Create New -->
|
||||
<string name="default_category">电视机</string>
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
<!-- Main UI -->
|
||||
<string name="create_new">Tap + to create new remote control</string>
|
||||
<string name="storage_permission_warning">Please grant storage read and write permission first</string>
|
||||
|
||||
<!-- Create New -->
|
||||
<string name="default_category">TV</string>
|
||||
|
||||
@@ -1,24 +1,29 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
buildscript {
|
||||
|
||||
repositories {
|
||||
jcenter()
|
||||
maven {
|
||||
url "https://maven.aliyun.com/nexus/content/repositories/releases"
|
||||
}
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:8.2.0'
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
classpath 'com.android.tools.build:gradle:8.1.0'
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
jcenter()
|
||||
maven {
|
||||
url "https://maven.aliyun.com/nexus/content/repositories/releases/"
|
||||
}
|
||||
maven {
|
||||
url "https://maven.aliyun.com/nexus/content/repositories/snapshots"
|
||||
}
|
||||
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
compileSdk 36
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 19
|
||||
targetSdkVersion 28
|
||||
minSdkVersion 26
|
||||
targetSdkVersion 36
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
@@ -17,6 +17,6 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api fileTree(include: ['*.jar'], dir: 'libs')
|
||||
api 'com.android.support:appcompat-v7:28.0.0'
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation 'com.android.support:appcompat-v7:28.0.0'
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
|
||||
>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<application android:allowBackup="true" android:label="@string/app_name"
|
||||
android:supportsRtl="true">
|
||||
|
||||
@@ -1,17 +1,22 @@
|
||||
# Project-wide Gradle settings.
|
||||
|
||||
# IDE (e.g. Android Studio) users:
|
||||
# Gradle settings configured through the IDE *will override*
|
||||
# any settings specified in this file.
|
||||
|
||||
# For more details on how to configure your build environment visit
|
||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||
|
||||
# Specifies the JVM arguments used for the daemon process.
|
||||
# The setting is particularly useful for tweaking memory settings.
|
||||
org.gradle.jvmargs=-Xmx1536m
|
||||
|
||||
org.gradle.jvmargs=-Xmx4096M \
|
||||
--add-exports=java.base/sun.nio.ch=ALL-UNNAMED \
|
||||
--add-opens=java.base/java.lang=ALL-UNNAMED \
|
||||
--add-opens=java.base/java.lang.reflect=ALL-UNNAMED \
|
||||
--add-opens=java.base/java.io=ALL-UNNAMED \
|
||||
--add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED
|
||||
# When configured, Gradle will run in incubating parallel mode.
|
||||
# This option should only be used with decoupled projects. More details, visit
|
||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||
# org.gradle.parallel=true
|
||||
android.useDeprecatedNdk=true
|
||||
android.defaults.buildfeatures.buildconfig=true
|
||||
android.nonTransitiveRClass=false
|
||||
android.nonFinalResIds=false
|
||||
@@ -1,5 +1,6 @@
|
||||
#Thu Jan 04 08:41:31 CST 2024
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
@@ -3,10 +3,10 @@ apply plugin: 'com.android.library'
|
||||
android {
|
||||
signingConfigs {
|
||||
}
|
||||
compileSdkVersion 33
|
||||
compileSdk 36
|
||||
defaultConfig {
|
||||
minSdkVersion 19
|
||||
targetSdkVersion 33
|
||||
minSdkVersion 26
|
||||
targetSdkVersion 36
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
@@ -20,7 +20,7 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api files('libs/gson-2.8.0.jar')
|
||||
api files('libs/okhttp-3.7.0.jar')
|
||||
api files('libs/okio-1.12.0.jar')
|
||||
implementation 'com.squareup.okhttp3:okhttp:4.11.0'
|
||||
implementation 'com.squareup.okio:okio:3.4.0'
|
||||
implementation 'com.google.code.gson:gson:2.13.2'
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
|
||||
>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<application android:allowBackup="true" android:supportsRtl="true">
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ public class WebAPIs {
|
||||
// download bin from OSS
|
||||
private static final String IR_BIN_FILE_PREFIX = "irda_";
|
||||
private static final String IR_BIN_FILE_SUFFIX = ".bin";
|
||||
private static final String IR_BIN_DOWNLOAD_PREFIX = "http://irext-debug.oss-cn-hangzhou.aliyuncs.com/";
|
||||
private static final String IR_BIN_DOWNLOAD_PREFIX = "https://irext-release.oss-cn-hangzhou.aliyuncs.com/";
|
||||
|
||||
private static final String SERVICE_SIGN_IN = "/app/app_login";
|
||||
private static final String SERVICE_LIST_CATEGORIES = "/indexing/list_categories";
|
||||
@@ -79,6 +79,7 @@ public class WebAPIs {
|
||||
}
|
||||
|
||||
private InputStream getFileByteStreamByURL(String url) throws IOException {
|
||||
Log.d(TAG, "download remote binary file, url = " + url);
|
||||
Request request = new Request.Builder()
|
||||
.url(url)
|
||||
.get()
|
||||
|
||||
Reference in New Issue
Block a user