Commit 2fd128e9 authored by Star Diao's avatar Star Diao

update ios

parent f6cc673e
## 介绍 ## 介绍
> lm-weex app 快速开发模板,可通过脚手架 lm-weex-cli `init` 指令快速生成。 > sl-weex app 安装。
### 运行命令:```lm-weex dev``` ###手脚架安装命令
### 项目构建:```lm-weex build``` ```
### 打包到IOS:```lm-weex pack ios``` npm install -g sl-weex-cli --registry=http://nexus.gsstcloud.com:8090/nexus/repository/npm-public
### 打包到安卓:```lm-weex pack android``` ```
> sl-weex app 快速开发模板,可通过脚手架 sl-weex-cli `init` 指令快速生成。
### 运行命令:```sl-weex dev```
### 项目构建:```sl-weex build```
### 打包到IOS:```sl-weex pack ios```
### 打包到安卓:```sl-weex pack android```
### 热更新:
``` sl-weex pack -s https://weex-publish.gsstcloud.com/app/add```
...@@ -15,10 +15,10 @@ module.exports = { ...@@ -15,10 +15,10 @@ module.exports = {
}, },
'url': { 'url': {
'image': 'http://www.superlinksoft.com/img-company/XXX', 'image': 'http://www.superlinksoft.com/img-company/XXX',
'bundleUpdate': 'http://localhosts:3001/app/check' 'bundleUpdate': 'https://weex-publish.gsstcloud.com/app/check'
}, },
'zipFolder': { 'zipFolder': {
'iOS': '/ios/LMWeex/LMWeex', 'iOS': '/ios/GSST/GSST',
'android': '/android/GSST/app/src/main/assets' 'android': '/android/GSST/app/src/main/assets'
}, },
'getui': { 'getui': {
......
...@@ -7,10 +7,10 @@ android { ...@@ -7,10 +7,10 @@ android {
flavorDimensions 'default' flavorDimensions 'default'
defaultConfig { defaultConfig {
applicationId APPLICATION_ID applicationId APPLICATION_ID
minSdkVersion 16 minSdkVersion 17
targetSdkVersion 26 targetSdkVersion 26
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0.0"
multiDexEnabled true multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true
...@@ -27,9 +27,9 @@ android { ...@@ -27,9 +27,9 @@ android {
signingConfigs { signingConfigs {
ddlStaff { ddlStaff {
keyAlias 'com.gsst.ddl.staff' keyAlias 'com.gsst.ddl.store'
keyPassword '123qazwsx' keyPassword '123qazwsx'
storeFile file('../com.gsst.ddl.staff.keystore') storeFile file('../com.gsst.ddl.store.keystore')
storePassword '123qazwsx' storePassword '123qazwsx'
v2SigningEnabled false v2SigningEnabled false
} }
...@@ -115,7 +115,7 @@ dependencies { ...@@ -115,7 +115,7 @@ dependencies {
// compile 'com.gsst.mobile:gsst-weex-base-library:0.0.04-SNAPSHOT' // compile 'com.gsst.mobile:gsst-weex-base-library:0.0.04-SNAPSHOT'
compile project(':nexus') compile project(':nexus')
compile project(':weex-framework') compile project(':weex-framework')
compile project(':gsstJPush') // compile project(':gsstJPush')
compile project(':wechatplugin') // compile project(':wechatplugin')
compile project(':pgyplugin') compile project(':pgyplugin')
} }
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"/> <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"/>
<application <application
android:allowBackup="false" android:allowBackup="false"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:label="@string/app_name" android:label="@string/app_name"
...@@ -42,9 +41,6 @@ ...@@ -42,9 +41,6 @@
android:name="com.gsst.App" android:name="com.gsst.App"
android:theme="@style/AppTheme.NoActionBar" android:theme="@style/AppTheme.NoActionBar"
> >
<activity android:name="com.eros.framework.activity.MainActivity" android:windowSoftInputMode="adjustResize"> <activity android:name="com.eros.framework.activity.MainActivity" android:windowSoftInputMode="adjustResize">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.VIEW"/> <action android:name="android.intent.action.VIEW"/>
......
"vsTZAbrVE4WzjaMh45cmyMTRpo8pnrFXjK/Fh13RfV2druWzknbKsiZndLNw+pea3518fVjh//yOub1lZcpqgu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aepoz7UbWRNlVWC3HYI41e+TJ13LHvtMU95ex1G0e5NgUenK2lbdRCdw+MKCVyecpLn+/0PQWm+Znv8B7M/cLQKZbSjz1UqNWxuE7IRKIrBVwyDGmXJI69cWDCFFXV8H8hBKJHdq7UUgoz1UPZwg="
...@@ -2,6 +2,7 @@ package com.gsst.activity; ...@@ -2,6 +2,7 @@ package com.gsst.activity;
import android.app.Activity; import android.app.Activity;
import android.os.Bundle; import android.os.Bundle;
import android.view.WindowManager;
import com.eros.framework.proxy.SplashActivityProxy; import com.eros.framework.proxy.SplashActivityProxy;
import com.gsst.clotee.R; import com.gsst.clotee.R;
...@@ -19,6 +20,13 @@ public class SplashActivity extends Activity { ...@@ -19,6 +20,13 @@ public class SplashActivity extends Activity {
setContentView(R.layout.activity_splash); setContentView(R.layout.activity_splash);
activityProxy = new SplashActivityProxy(); activityProxy = new SplashActivityProxy();
activityProxy.onCreateInit(this); activityProxy.onCreateInit(this);
SystemUIUtils.setStickFullScreen(getWindow().getDecorView());
}
@Override
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
SystemUIUtils.setStickFullScreen(getWindow().getDecorView());
} }
@Override @Override
......
package com.gsst.activity;
import android.view.View;
class SystemUIUtils {
public static void setStickFullScreen(View view) {
int systemUiVisibility = view.getSystemUiVisibility();
int flags = View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION // hide nav bar
| View.SYSTEM_UI_FLAG_FULLSCREEN // hide status bar
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
systemUiVisibility |= flags;
view.setSystemUiVisibility(systemUiVisibility);
}
}
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
<resources> <resources>
<color name="colorPrimary">#3F51B5</color> <color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color> <color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color> <color name="colorAccent">#2db7f5</color>
</resources> </resources>
<resources> <resources>
<string name="app_name">店店联:服务人员</string> <string name="app_name">店店联</string>
<string name="umeng_socialize_female"></string> <string name="umeng_socialize_female"></string>
<string name="umeng_socialize_male"></string> <string name="umeng_socialize_male"></string>
</resources> </resources>
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1},"path":"app-yingyongbao-release.apk","properties":{"packageId":"com.gsst.ddlstaff","split":"","minSdkVersion":"16"}}] [{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1},"path":"app-yingyongbao-release.apk","properties":{"packageId":"com.gsst.ddl.store","split":"","minSdkVersion":"17"}}]
\ No newline at end of file \ No newline at end of file
...@@ -34,6 +34,7 @@ subprojects { ...@@ -34,6 +34,7 @@ subprojects {
repositories { repositories {
google() google()
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven { url 'http://192.168.12.122:8090/nexus/repository/maven-snapshots/' }
} }
buildscript { buildscript {
repositories { repositories {
......
...@@ -7,7 +7,7 @@ android { ...@@ -7,7 +7,7 @@ android {
defaultConfig { defaultConfig {
minSdkVersion 16 minSdkVersion 17
targetSdkVersion 25 targetSdkVersion 25
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
...@@ -29,8 +29,9 @@ android { ...@@ -29,8 +29,9 @@ android {
} }
dependencies { dependencies {
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
compile fileTree(include: ['*.jar'], dir: 'libs') compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:25.3.1' implementation 'com.android.support:appcompat-v7:25.3.1'
testCompile 'junit:junit:4.12' testCompile 'junit:junit:4.12'
androidTestCompile('com.android.support.test.espresso:espresso-core:3.0.2', { androidTestCompile('com.android.support.test.espresso:espresso-core:3.0.2', {
exclude group: 'com.android.support', module: 'support-annotations' exclude group: 'com.android.support', module: 'support-annotations'
...@@ -38,23 +39,23 @@ dependencies { ...@@ -38,23 +39,23 @@ dependencies {
/** /**
* debug调试要用到的 * debug调试要用到的
*/ */
compile 'com.taobao.android.weex_inspection:protocol:1.1.4.1' implementation 'com.taobao.android.weex_inspection:protocol:1.1.4.1'
compile 'com.taobao.android:weex_inspector:0.13.4' implementation 'com.taobao.android:weex_inspector:0.13.4'
compile 'com.squareup.okhttp:okhttp-ws:2.3.0' implementation 'com.squareup.okhttp:okhttp-ws:2.3.0'
compile 'com.squareup.okhttp3:okhttp:3.8.0' implementation 'com.squareup.okhttp3:okhttp:3.8.0'
compile 'com.lzy.widget:imagepicker:0.6.1' implementation 'com.lzy.widget:imagepicker:0.6.1'
compile 'com.journeyapps:zxing-android-embedded:3.4.0' implementation 'com.journeyapps:zxing-android-embedded:3.4.0'
compile 'com.github.chrisbanes.photoview:library:1.2.4' implementation 'com.github.chrisbanes.photoview:library:1.2.4'
compile 'com.android.support:multidex:1.0.1' implementation 'com.android.support:multidex:1.0.1'
//bs patch //bs patch
compile 'me.ele:bspatch:1.0.6' implementation 'me.ele:bspatch:1.0.6'
//weex analyzer //weex analyzer
compile 'com.taobao.android:weex_analyzer:0.1.0.5' implementation 'com.taobao.android:weex_analyzer:0.1.0.5'
//Bindigx //Bindigx
compile 'com.alibaba.android:bindingx-core:1.0.1' implementation 'com.alibaba.android:bindingx-core:1.0.1'
compile 'com.alibaba.android:bindingx_weex_plugin:1.0.2' implementation 'com.alibaba.android:bindingx_weex_plugin:1.0.2'
compile 'org.weex.plugin:plugin-loader:1.0.0' implementation 'org.weex.plugin:plugin-loader:1.0.0'
compile ('com.github.niorgai:StatusBarCompat:2.1.4', { compile('com.github.niorgai:StatusBarCompat:2.1.4', {
exclude group: 'com.android.support' exclude group: 'com.android.support'
}) })
// compile 'com.gsst.mobile:gsst-weex-base-plugin:0.0.03-SNAPSHOT' // compile 'com.gsst.mobile:gsst-weex-base-plugin:0.0.03-SNAPSHOT'
...@@ -62,7 +63,6 @@ dependencies { ...@@ -62,7 +63,6 @@ dependencies {
compile project(':nexus') compile project(':nexus')
// debugImplementation "com.squareup.leakcanary:leakcanary-android:1.5.4" // debugImplementation "com.squareup.leakcanary:leakcanary-android:1.5.4"
// releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:1.5.4" // releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:1.5.4"
} }
......
<?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"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
package="com.eros.framework"> package="com.eros.framework">
<application <application
tools:replace="android:allowBackup"
android:allowBackup="false" android:allowBackup="false"
android:label="@string/app_name" android:label="@string/app_name"
android:supportsRtl="true"></application> android:supportsRtl="true"
tools:replace="android:allowBackup">
<activity android:name=".activity.SubDisplayActivity"></activity>
</application>
</manifest> </manifest>
\ No newline at end of file
...@@ -156,6 +156,12 @@ public class AbstractWeexActivity extends AppCompatActivity implements IWXRender ...@@ -156,6 +156,12 @@ public class AbstractWeexActivity extends AppCompatActivity implements IWXRender
} }
@Override
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(true);
setStickFullScreen(getWindow().getDecorView());
}
private void initDebug() { private void initDebug() {
if (!DebugableUtil.isDebug()) return; if (!DebugableUtil.isDebug()) return;
...@@ -930,18 +936,32 @@ public class AbstractWeexActivity extends AppCompatActivity implements IWXRender ...@@ -930,18 +936,32 @@ public class AbstractWeexActivity extends AppCompatActivity implements IWXRender
} }
public void statusBarHidden(boolean isFullScreen){ public void statusBarHidden(boolean isFullScreen){
if (isFullScreen) {
setFullScreen(this); setFullScreen(this);
} else { // if (isFullScreen) {
quitFullScreen(this); // setFullScreen(this);
} // } else {
// quitFullScreen(this);
// }
} }
private void setFullScreen(Activity activity) { private void setFullScreen(Activity activity) {
if (!isStatusBarHidden) { if (!isStatusBarHidden) {
activity.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); activity.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN , WindowManager.LayoutParams.FLAG_FULLSCREEN);
isStatusBarHidden = true; isStatusBarHidden = true;
setStickFullScreen(getWindow().getDecorView());
}
} }
public static void setStickFullScreen(View view) {
int systemUiVisibility = view.getSystemUiVisibility();
int flags = View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION // hide nav bar
| View.SYSTEM_UI_FLAG_FULLSCREEN // hide status bar
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
systemUiVisibility |= flags;
view.setSystemUiVisibility(systemUiVisibility);
} }
......
...@@ -4,10 +4,15 @@ import android.content.BroadcastReceiver; ...@@ -4,10 +4,15 @@ import android.content.BroadcastReceiver;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.IntentFilter; import android.content.IntentFilter;
import android.content.pm.ActivityInfo;
import android.hardware.display.DisplayManager;
import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.support.v4.content.LocalBroadcastManager; import android.support.v4.content.LocalBroadcastManager;
import android.util.Log; import android.util.Log;
import android.view.Display;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.view.ViewStub; import android.view.ViewStub;
import android.view.WindowManager; import android.view.WindowManager;
...@@ -22,10 +27,12 @@ import com.eros.framework.manager.impl.GlobalEventManager; ...@@ -22,10 +27,12 @@ import com.eros.framework.manager.impl.GlobalEventManager;
import com.eros.framework.model.RouterModel; import com.eros.framework.model.RouterModel;
import com.eros.framework.model.TabbarBadgeModule; import com.eros.framework.model.TabbarBadgeModule;
import com.eros.framework.model.WeexEventBean; import com.eros.framework.model.WeexEventBean;
import com.eros.framework.presentation.SubDisplay;
import com.eros.framework.utils.SharePreferenceUtil; import com.eros.framework.utils.SharePreferenceUtil;
import com.eros.framework.view.TableView; import com.eros.framework.view.TableView;
import com.taobao.weex.WXSDKEngine; import com.taobao.weex.WXSDKEngine;
import com.taobao.weex.WXSDKInstance; import com.taobao.weex.WXSDKInstance;
import com.taobao.weex.utils.WXLogUtils;
public class MainActivity extends AbstractWeexActivity { public class MainActivity extends AbstractWeexActivity {
private FrameLayout layout_container; private FrameLayout layout_container;
...@@ -38,6 +45,8 @@ public class MainActivity extends AbstractWeexActivity { ...@@ -38,6 +45,8 @@ public class MainActivity extends AbstractWeexActivity {
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main); setContentView(R.layout.activity_main);
// hideBottomUIMenu();
// AndroidBug5497Workaround.assistActivity(this); // AndroidBug5497Workaround.assistActivity(this);
routerModel = (RouterModel) getIntent().getSerializableExtra(Constant.ROUTERPARAMS); routerModel = (RouterModel) getIntent().getSerializableExtra(Constant.ROUTERPARAMS);
if (Constant.TABBAR.equals(routerModel.url)) { if (Constant.TABBAR.equals(routerModel.url)) {
...@@ -50,7 +59,29 @@ public class MainActivity extends AbstractWeexActivity { ...@@ -50,7 +59,29 @@ public class MainActivity extends AbstractWeexActivity {
initReloadReceiver(); initReloadReceiver();
statusBarHidden(BMWXApplication.getWXApplication().IS_FULL_SCREEN); statusBarHidden(BMWXApplication.getWXApplication().IS_FULL_SCREEN);
// getWindow().addFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
// 副屏内容展示
Display display = getPresentationDisplays();
if(display != null){
SubDisplay textDisplay = new SubDisplay(this, display);
textDisplay.show();
}
} }
// protected void hideBottomUIMenu() {
// //隐藏虚拟按键,并且全屏
// if (Build.VERSION.SDK_INT > 11 && Build.VERSION.SDK_INT < 19) { // lower api
// View v = this.getWindow().getDecorView();
// v.setSystemUiVisibility(View.GONE);
// } else if (Build.VERSION.SDK_INT >= 19) {
// //for new api versions.
// View decorView = getWindow().getDecorView();
// int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
// | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY | View.SYSTEM_UI_FLAG_FULLSCREEN;
// decorView.setSystemUiVisibility(uiOptions);
// }
// }
private void initReloadReceiver() { private void initReloadReceiver() {
...@@ -142,6 +173,22 @@ public class MainActivity extends AbstractWeexActivity { ...@@ -142,6 +173,22 @@ public class MainActivity extends AbstractWeexActivity {
return -1; return -1;
} }
// 获取副屏
public Display getPresentationDisplays() {
DisplayManager manager = (DisplayManager) getSystemService(Context.DISPLAY_SERVICE);
Display[] displays = manager.getDisplays();
for (int i = 0; i < displays.length; i++) {
Log.e("SUB_DISPLAY", "屏幕" + displays[i]);
if ((displays[i].getFlags() & Display.FLAG_SECURE) != 0
&& (displays[i].getFlags() & Display.FLAG_SUPPORTS_PROTECTED_BUFFERS) != 0
&& (displays[i].getFlags() & Display.FLAG_PRESENTATION) != 0) {
Log.e("SUB_DISPLAY", "第一个真实存在的副屏屏幕" + displays[i]);
return displays[i];
}
}
return null;
}
@Override @Override
protected void onDestroy() { protected void onDestroy() {
super.onDestroy(); super.onDestroy();
......
package com.eros.framework.activity;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import com.eros.framework.R;
public class SubDisplayActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sub_display);
}
}
...@@ -104,6 +104,7 @@ public class ModalManager extends Manager { ...@@ -104,6 +104,7 @@ public class ModalManager extends Manager {
Toast mToast = Toast.makeText(context, message, duration); Toast mToast = Toast.makeText(context, message, duration);
mToast.setDuration(duration); mToast.setDuration(duration);
mToast.setText(message); mToast.setText(message);
mToast.setGravity(Gravity.CENTER, 0, 0);
mToast.show(); mToast.show();
} else { } else {
Log.i("BMModalManager", "toast can not show in child thread"); Log.i("BMModalManager", "toast can not show in child thread");
......
...@@ -3,6 +3,7 @@ package com.eros.framework.manager.impl; ...@@ -3,6 +3,7 @@ package com.eros.framework.manager.impl;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.Log;
import com.eros.framework.BMWXEnvironment; import com.eros.framework.BMWXEnvironment;
import com.eros.framework.constant.Constant; import com.eros.framework.constant.Constant;
...@@ -28,6 +29,7 @@ import java.util.HashMap; ...@@ -28,6 +29,7 @@ import java.util.HashMap;
*/ */
public class VersionManager extends Manager { public class VersionManager extends Manager {
private static final String TAG = "VersionManager";
public long prepareJsBundle(Context context) { public long prepareJsBundle(Context context) {
long startTime = new Date().getTime(); long startTime = new Date().getTime();
...@@ -138,6 +140,7 @@ public class VersionManager extends Manager { ...@@ -138,6 +140,7 @@ public class VersionManager extends Manager {
params.put("appName", BMWXEnvironment.mPlatformConfig.getAppName()); params.put("appName", BMWXEnvironment.mPlatformConfig.getAppName());
params.put("android", BaseCommonUtil.getVersionName(context)); params.put("android", BaseCommonUtil.getVersionName(context));
String versionInfo = SharePreferenceUtil.getDownLoadVersion(context); String versionInfo = SharePreferenceUtil.getDownLoadVersion(context);
Log.e(TAG, "getDownLoadVersion:" + versionInfo);
if (TextUtils.isEmpty(versionInfo)) { if (TextUtils.isEmpty(versionInfo)) {
versionInfo = SharePreferenceUtil.getVersion(context); versionInfo = SharePreferenceUtil.getVersion(context);
} }
...@@ -151,6 +154,7 @@ public class VersionManager extends Manager { ...@@ -151,6 +154,7 @@ public class VersionManager extends Manager {
versionInfo = ""; versionInfo = "";
} else { } else {
versionInfo = jsVersionInfoBean.getJsVersion(); versionInfo = jsVersionInfoBean.getJsVersion();
Log.e(TAG, "versionInfo:" + versionInfo);
} }
} }
if (TextUtils.isEmpty(versionInfo)) { if (TextUtils.isEmpty(versionInfo)) {
...@@ -164,6 +168,7 @@ public class VersionManager extends Manager { ...@@ -164,6 +168,7 @@ public class VersionManager extends Manager {
public void downloadBundle(String url, FileCallBack fileCallBack) { public void downloadBundle(String url, FileCallBack fileCallBack) {
AxiosManager axiosManager = ManagerFactory.getManagerService(AxiosManager.class); AxiosManager axiosManager = ManagerFactory.getManagerService(AxiosManager.class);
Log.e(TAG, "下载包:" + url);
axiosManager.download(url, fileCallBack); axiosManager.download(url, fileCallBack);
} }
......
package com.eros.framework.presentation;
import android.app.Presentation;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.Display;
import android.widget.ImageView;
import com.eros.framework.R;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
public class SubDisplay extends Presentation {
private static final String TAG = "SubDisplay";
private ImageView imageView;
final String url = "https://file.cdn.sunmi.com/newebsite/home/P2Pro-banner-PC.jpg";
public SubDisplay(Context outerContext, Display display){
super(outerContext, display);
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sub_display);
imageView = (ImageView) findViewById(R.id.sub_display2);
// new Thread(new Runnable() {
// @Override
// public void run() {
// Bitmap bmp = getURLimage(url);
// Message msg = new Message();
// msg.what = 0;
// msg.obj = bmp;
// System.out.println("000");
// handle.sendMessage(msg);
// }
// }).start();
}
//在消息队列中实现对控件的更改
private Handler handle = new Handler() {
public void handleMessage(Message msg) {
switch (msg.what) {
case 0:
System.out.println("111");
Bitmap bmp=(Bitmap)msg.obj;
imageView.setImageBitmap(bmp);
break;
}
}
};
//加载图片
public Bitmap getURLimage(String url) {
Bitmap bmp = null;
try {
URL myurl = new URL(url);
// 获得连接
HttpURLConnection conn = (HttpURLConnection) myurl.openConnection();
conn.setConnectTimeout(6000);//设置超时
conn.setDoInput(true);
conn.setUseCaches(false);//不缓存
conn.connect();
InputStream is = conn.getInputStream();//获得图片的数据流
bmp = BitmapFactory.decodeStream(is);//读取图像数据
//读取文本数据
//byte[] buffer = new byte[100];
//inputStream.read(buffer);
//text = new String(buffer);
is.close();
} catch (Exception e) {
e.printStackTrace();
}
return bmp;
}
}
package com.eros.framework.proxy;
import android.view.View;
class SystemUIUtils {
public static void setStickFullScreen(View view) {
int systemUiVisibility = view.getSystemUiVisibility();
int flags = View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION // hide nav bar
| View.SYSTEM_UI_FLAG_FULLSCREEN // hide status bar
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
systemUiVisibility |= flags;
view.setSystemUiVisibility(systemUiVisibility);
}
}
...@@ -30,12 +30,14 @@ import com.eros.framework.utils.SharePreferenceUtil; ...@@ -30,12 +30,14 @@ import com.eros.framework.utils.SharePreferenceUtil;
import com.squareup.otto.Subscribe; import com.squareup.otto.Subscribe;
import java.io.File; import java.io.File;
import java.io.IOException;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import me.ele.patch.BsPatch; import me.ele.patch.BsPatch;
import okhttp3.Call; import okhttp3.Call;
import okhttp3.Response;
/** /**
* Created by Carry on 2017/11/23. * Created by Carry on 2017/11/23.
...@@ -58,7 +60,7 @@ public class VersionChecker { ...@@ -58,7 +60,7 @@ public class VersionChecker {
public void checkVersion() { public void checkVersion() {
if (mCurrentStatus == Constant.Version.UPDATING || mCustomerUpdate) return; if (mCurrentStatus == Constant.Version.UPDATING || mCustomerUpdate) return;
readyUpdate(null, true); readyUpdate(null, false);
} }
...@@ -93,12 +95,14 @@ public class VersionChecker { ...@@ -93,12 +95,14 @@ public class VersionChecker {
Activity activity = RouterTracker.peekActivity(); Activity activity = RouterTracker.peekActivity();
//此时说明栈中没有可用activity 监听入栈事件 //此时说明栈中没有可用activity 监听入栈事件
if (activity != null) { if (activity != null) {
Log.e(TAG, "弹出更新提示");
ModalManager.BmAlert.showAlert(activity, mContext.getResources() ModalManager.BmAlert.showAlert(activity, mContext.getResources()
.getString(R.string.str_update_title), mContext.getResources() .getString(R.string.str_update_title), mContext.getResources()
.getString(R.string.str_update_tips), mContext.getResources().getString(R.string .getString(R.string.str_update_tips), mContext.getResources().getString(R.string
.str_ensure), new DialogInterface.OnClickListener() { .str_ensure), new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
Log.e(TAG, "重启");
restartApp(); restartApp();
} }
}, null, null, null, null, false); }, null, null, null, null, false);
...@@ -136,7 +140,7 @@ public class VersionChecker { ...@@ -136,7 +140,7 @@ public class VersionChecker {
post(9, msg); post(9, msg);
} }
private void readyUpdate(String path, boolean diff) { private void readyUpdate(String path, final boolean diff) {
mUpdateUrl = BMWXEnvironment.mPlatformConfig.getUrl().getBundleUpdate(); mUpdateUrl = BMWXEnvironment.mPlatformConfig.getUrl().getBundleUpdate();
if (!TextUtils.isEmpty(path)) { if (!TextUtils.isEmpty(path)) {
mUpdateUrl = path; mUpdateUrl = path;
...@@ -150,6 +154,7 @@ public class VersionChecker { ...@@ -150,6 +154,7 @@ public class VersionChecker {
VersionManager versionManager = ManagerFactory.getManagerService(VersionManager.class); VersionManager versionManager = ManagerFactory.getManagerService(VersionManager.class);
versionManager.checkBundleUpdate(mContext, mUpdateUrl, versionManager.checkBundleUpdate(mContext, mUpdateUrl,
diff, new StringCallback() { diff, new StringCallback() {
final Boolean _diff = diff;
@Override @Override
public void onError(Call call, Exception e, int id) { public void onError(Call call, Exception e, int id) {
Log.e(TAG, "获取更新失败"); Log.e(TAG, "获取更新失败");
...@@ -157,6 +162,11 @@ public class VersionChecker { ...@@ -157,6 +162,11 @@ public class VersionChecker {
mCurrentStatus = Constant.Version.SLEEP; mCurrentStatus = Constant.Version.SLEEP;
} }
@Override
public String parseNetworkResponse(Response response, int id) throws IOException {
return super.parseNetworkResponse(response, id);
}
@Override @Override
public void onResponse(String response, int id) { public void onResponse(String response, int id) {
VersionBean version = ManagerFactory.getManagerService(ParseManager VersionBean version = ManagerFactory.getManagerService(ParseManager
...@@ -179,12 +189,12 @@ public class VersionChecker { ...@@ -179,12 +189,12 @@ public class VersionChecker {
} else { } else {
//下载全量包 //下载全量包
Log.e(TAG, "检查全量包"); Log.e(TAG, "检查全量包");
downloadCompleteZip(); downloadCompleteZip(_diff);
} }
} else { } else {
//下载全量包 //下载全量包
Log.e(TAG, "检查全量包"); Log.e(TAG, "检查全量包");
downloadCompleteZip(); downloadCompleteZip(_diff);
} }
break; break;
case 401: case 401:
...@@ -214,8 +224,9 @@ public class VersionChecker { ...@@ -214,8 +224,9 @@ public class VersionChecker {
/** /**
* 下载全量包 * 下载全量包
*/ */
private void downloadCompleteZip() { private void downloadCompleteZip(Boolean diff) {
VersionManager versionManager = ManagerFactory.getManagerService(VersionManager.class); VersionManager versionManager = ManagerFactory.getManagerService(VersionManager.class);
final Boolean _diff = diff;
versionManager.checkBundleUpdate(mContext, mUpdateUrl, versionManager.checkBundleUpdate(mContext, mUpdateUrl,
false, new StringCallback() { false, new StringCallback() {
@Override @Override
...@@ -232,7 +243,7 @@ public class VersionChecker { ...@@ -232,7 +243,7 @@ public class VersionChecker {
.class); .class);
if (version != null && !TextUtils.isEmpty(version.data.path)) { if (version != null && !TextUtils.isEmpty(version.data.path)) {
L.e(TAG, "检查全量包成功!,开始下载"); L.e(TAG, "检查全量包成功!,开始下载");
download(version, true); download(version, _diff);
} }
} }
}); });
...@@ -255,7 +266,7 @@ public class VersionChecker { ...@@ -255,7 +266,7 @@ public class VersionChecker {
public void onError(Call call, Exception e, int id) { public void onError(Call call, Exception e, int id) {
Log.e(TAG, "下载插分包出错"); Log.e(TAG, "下载插分包出错");
if (!complete) { if (!complete) {
downloadCompleteZip(); downloadCompleteZip(complete);
} else { } else {
postFailed("下载全量包失败"); postFailed("下载全量包失败");
mCurrentStatus = Constant.Version.SLEEP; mCurrentStatus = Constant.Version.SLEEP;
...@@ -271,6 +282,7 @@ public class VersionChecker { ...@@ -271,6 +282,7 @@ public class VersionChecker {
File download = new File(FileManager.getTempBundleDir(mContext) File download = new File(FileManager.getTempBundleDir(mContext)
, FileManager.TEMP_BUNDLE_NAME); , FileManager.TEMP_BUNDLE_NAME);
if (checkZipValidate(download)) { if (checkZipValidate(download)) {
Log.e(TAG, "更新包md5校验成功");
RenameDeleteFile(); RenameDeleteFile();
//更改本地jsversion //更改本地jsversion
SharePreferenceUtil.setDownLoadVersion(mContext, SharePreferenceUtil.setDownLoadVersion(mContext,
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".activity.SubDisplayActivity"
>
<ImageView
android:id="@+id/sub_display2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:src="@drawable/sub_display"
/>
</LinearLayout>
\ No newline at end of file
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
<resources> <resources>
<color name="colorPrimary">#3F51B5</color> <color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color> <color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color> <color name="colorAccent">#2db7f5</color>
<color name="msg_point_red">#ff1300</color> <color name="msg_point_red">#ff1300</color>
</resources> </resources>
org.gradle.jvmargs=-Xmx1536m org.gradle.jvmargs=-Xmx1536m
android.enableAapt2=false android.enableAapt2=false
APPLICATION_ID=com.gsst.ddl.staff APPLICATION_ID=com.gsst.ddl.store
GRADLE_TOOL_VERSION=3.0.0 GRADLE_TOOL_VERSION=3.0.0
GRADLE_VERSION=https\://services.gradle.org/distributions/gradle-4.1-all.zip GRADLE_VERSION=https\://services.gradle.org/distributions/gradle-4.1-all.zip
MIN_SDK_VERSION=14 MIN_SDK_VERSION=14
...@@ -30,6 +30,46 @@ PROJECT_SUPPORTLIBVERSION=25.3.1 ...@@ -30,6 +30,46 @@ PROJECT_SUPPORTLIBVERSION=25.3.1
......
...@@ -3,7 +3,7 @@ apply plugin: 'com.android.library' ...@@ -3,7 +3,7 @@ apply plugin: 'com.android.library'
android { android {
compileSdkVersion 25 compileSdkVersion 25
defaultConfig { defaultConfig {
minSdkVersion 16 minSdkVersion 17
targetSdkVersion 26 targetSdkVersion 26
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
......
include ':app',':weex-framework',':nexus',':gsstJPush',':pgyplugin', ':wechatplugin' include ':app',':weex-framework',':sdk',':nexus',':pgyplugin'
project(':weex-framework').projectDir = new File(settingsDir,'/eros-framework') project(':weex-framework').projectDir = new File(settingsDir,'/eros-framework')
project(':sdk').projectDir = new File(settingsDir,'/nexus/sdk')
project(':nexus').projectDir = new File(settingsDir,'/nexus') project(':nexus').projectDir = new File(settingsDir,'/nexus')
project(':gsstJPush').projectDir = new File(settingsDir,'/gsstJPush') //project(':gsstJPush').projectDir = new File(settingsDir,'/gsstJPush')
project(':pgyplugin').projectDir = new File(settingsDir,'/pgyplugin') project(':pgyplugin').projectDir = new File(settingsDir,'/pgyplugin')
project(':wechatplugin').projectDir = new File(settingsDir,'/wechatplugin') //project(':wechatplugin').projectDir = new File(settingsDir,'/wechatplugin')
...@@ -7,7 +7,7 @@ android { ...@@ -7,7 +7,7 @@ android {
// baseFeature true // baseFeature true
defaultConfig { defaultConfig {
minSdkVersion 16 minSdkVersion 17
targetSdkVersion 26 targetSdkVersion 26
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
......
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
<resources> <resources>
<color name="colorPrimary">#3F51B5</color> <color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color> <color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color> <color name="colorAccent">#2db7f5</color>
</resources> </resources>
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Scheme <Scheme
LastUpgradeVersion = "1010" LastUpgradeVersion = "1120"
version = "1.3"> version = "1.3">
<BuildAction <BuildAction
parallelizeBuildables = "YES" parallelizeBuildables = "YES"
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "9737F9E71F384AFD00000800" BlueprintIdentifier = "9737F9E71F384AFD00000800"
BuildableName = "LMWeex.app" BuildableName = "GSSTStorePos.app"
BlueprintName = "LMWeex" BlueprintName = "GSST"
ReferencedContainer = "container:LMWeex.xcodeproj"> ReferencedContainer = "container:GSST.xcodeproj">
</BuildableReference> </BuildableReference>
</BuildActionEntry> </BuildActionEntry>
</BuildActionEntries> </BuildActionEntries>
...@@ -29,17 +29,6 @@ ...@@ -29,17 +29,6 @@
shouldUseLaunchSchemeArgsEnv = "YES"> shouldUseLaunchSchemeArgsEnv = "YES">
<Testables> <Testables>
</Testables> </Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9737F9E71F384AFD00000800"
BuildableName = "LMWeex.app"
BlueprintName = "LMWeex"
ReferencedContainer = "container:LMWeex.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction> </TestAction>
<LaunchAction <LaunchAction
buildConfiguration = "Debug" buildConfiguration = "Debug"
...@@ -56,13 +45,11 @@ ...@@ -56,13 +45,11 @@
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "9737F9E71F384AFD00000800" BlueprintIdentifier = "9737F9E71F384AFD00000800"
BuildableName = "LMWeex.app" BuildableName = "GSSTStorePos.app"
BlueprintName = "LMWeex" BlueprintName = "GSST"
ReferencedContainer = "container:LMWeex.xcodeproj"> ReferencedContainer = "container:GSST.xcodeproj">
</BuildableReference> </BuildableReference>
</BuildableProductRunnable> </BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction> </LaunchAction>
<ProfileAction <ProfileAction
buildConfiguration = "Release" buildConfiguration = "Release"
...@@ -75,9 +62,9 @@ ...@@ -75,9 +62,9 @@
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "9737F9E71F384AFD00000800" BlueprintIdentifier = "9737F9E71F384AFD00000800"
BuildableName = "LMWeex.app" BuildableName = "GSSTStorePos.app"
BlueprintName = "LMWeex" BlueprintName = "GSST"
ReferencedContainer = "container:LMWeex.xcodeproj"> ReferencedContainer = "container:GSST.xcodeproj">
</BuildableReference> </BuildableReference>
</BuildableProductRunnable> </BuildableProductRunnable>
</ProfileAction> </ProfileAction>
......
// //
// AppDelegate.h // AppDelegate.h
// LMWeex // GSST
// //
// Created by XHY on 2017/8/7. // Created by XHY on 2017/8/7.
// Copyright © 2019年 gsst. All rights reserved. // Copyright © 2019年 gsst. All rights reserved.
......
// //
// AppDelegate.m // AppDelegate.m
// LMWeex // GSST
// //
// Created by XHY on 2017/8/7. // Created by XHY on 2017/8/7.
// Copyright © 2019年 gsst. All rights reserved. // Copyright © 2019年 gsst. All rights reserved.
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment