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.michaelpardo:activeandroid:3.1.0-SNAPSHOT'
|
||||
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: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>
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import android.util.Log;
|
||||
import com.activeandroid.ActiveAndroid;
|
||||
|
||||
import net.irext.webapi.WebAPIs;
|
||||
import net.irext.webapi.model.Admin;
|
||||
import net.irext.webapi.model.UserApp;
|
||||
|
||||
/**
|
||||
* 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 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";
|
||||
|
||||
public WebAPIs mWeAPIs = WebAPIs.getInstance(ADDRESS, APP_NAME);
|
||||
|
||||
private Admin mAdmin;
|
||||
private UserApp mUserApp;
|
||||
|
||||
public Admin getAdmin() {
|
||||
return mAdmin;
|
||||
public UserApp getAdmin() {
|
||||
return mUserApp;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -43,8 +44,10 @@ public class IRApplication extends com.activeandroid.app.Application {
|
||||
new Thread() {
|
||||
@Override
|
||||
public void run() {
|
||||
mAdmin = mWeAPIs.signIn("guest@irext.net", "irextguest");
|
||||
Log.d(TAG, "signIn response : " + mAdmin.getId() + ", " + mAdmin.getToken());
|
||||
mUserApp = mWeAPIs.signIn(IRApplication.this);
|
||||
if (null != mUserApp) {
|
||||
Log.d(TAG, "signIn response : " + mUserApp.getId() + ", " + mUserApp.getToken());
|
||||
}
|
||||
}
|
||||
}.start();
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ buildscript {
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:2.3.1'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
}
|
||||
|
||||
@@ -9,9 +9,6 @@ android {
|
||||
targetSdkVersion 25
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
|
||||
}
|
||||
buildTypes {
|
||||
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