updated web-api for Android only
This commit is contained in:
@@ -41,5 +41,5 @@ dependencies {
|
|||||||
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.jar')
|
compile project(':web-api')
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
BIN
Android/app/libs/web-api.aar
Normal file
BIN
Android/app/libs/web-api.aar
Normal file
Binary file not shown.
@@ -56,6 +56,13 @@
|
|||||||
android:name="AA_MODELS"
|
android:name="AA_MODELS"
|
||||||
android:value="net.irext.ircontrol.bean.RemoteControl"/>
|
android:value="net.irext.ircontrol.bean.RemoteControl"/>
|
||||||
|
|
||||||
|
<meta-data
|
||||||
|
android:name="irext_app_key"
|
||||||
|
android:value="2841eeac09567f3394f051f8" />
|
||||||
|
|
||||||
|
<meta-data
|
||||||
|
android:name="irext_app_secret"
|
||||||
|
android:value="65c0afc9d61feef012eb7dac" />
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import android.util.Log;
|
|||||||
import com.activeandroid.ActiveAndroid;
|
import com.activeandroid.ActiveAndroid;
|
||||||
|
|
||||||
import net.irext.webapi.WebAPIs;
|
import net.irext.webapi.WebAPIs;
|
||||||
import net.irext.webapi.model.Admin;
|
import net.irext.webapi.model.UserApp;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filename: IRApplication.java
|
* Filename: IRApplication.java
|
||||||
@@ -21,15 +21,16 @@ 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://irext.net:8080";
|
// private static final String ADDRESS = "http://irext.net:8080";
|
||||||
|
private static final String ADDRESS = "http://192.168.137.128:8080";
|
||||||
private static final String APP_NAME = "/irext-server";
|
private static final String APP_NAME = "/irext-server";
|
||||||
|
|
||||||
public WebAPIs mWeAPIs = WebAPIs.getInstance(ADDRESS, APP_NAME);
|
public WebAPIs mWeAPIs = WebAPIs.getInstance(ADDRESS, APP_NAME);
|
||||||
|
|
||||||
private Admin mAdmin;
|
private UserApp mUserApp;
|
||||||
|
|
||||||
public Admin getAdmin() {
|
public UserApp getAdmin() {
|
||||||
return mAdmin;
|
return mUserApp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -43,8 +44,10 @@ public class IRApplication extends com.activeandroid.app.Application {
|
|||||||
new Thread() {
|
new Thread() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
mAdmin = mWeAPIs.signIn("guest@irext.net", "irextguest");
|
mUserApp = mWeAPIs.signIn(IRApplication.this);
|
||||||
Log.d(TAG, "signIn response : " + mAdmin.getId() + ", " + mAdmin.getToken());
|
if (null != mUserApp) {
|
||||||
|
Log.d(TAG, "signIn response : " + mUserApp.getId() + ", " + mUserApp.getToken());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}.start();
|
}.start();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ buildscript {
|
|||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:2.3.1'
|
classpath 'com.android.tools.build:gradle:2.3.1'
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,9 +9,6 @@ android {
|
|||||||
targetSdkVersion 25
|
targetSdkVersion 25
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "1.0"
|
versionName "1.0"
|
||||||
|
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
|
||||||
|
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
include ':app', ':decodesdk'
|
include ':app', ':decodesdk', ':web-api'
|
||||||
|
|||||||
2
Android/web-api/build.gradle
Normal file
2
Android/web-api/build.gradle
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
configurations.maybeCreate("default")
|
||||||
|
artifacts.add("default", file('web-api.aar'))
|
||||||
BIN
Android/web-api/web-api.aar
Normal file
BIN
Android/web-api/web-api.aar
Normal file
Binary file not shown.
Reference in New Issue
Block a user