Compare commits
6 Commits
apputils-v
...
apputils-v
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
abb5d750c1 | ||
|
|
dc000567cd | ||
|
|
c3ccfd3c23 | ||
|
|
d2c649fe65 | ||
|
|
3b61a93402 | ||
|
|
a9aee97e41 |
@@ -1,8 +1,8 @@
|
|||||||
#Created by .winboll/winboll_app_build.gradle
|
#Created by .winboll/winboll_app_build.gradle
|
||||||
#Mon Mar 24 17:14:43 HKT 2025
|
#Tue Mar 25 03:48:30 HKT 2025
|
||||||
stageCount=16
|
stageCount=18
|
||||||
libraryProject=libapputils
|
libraryProject=libapputils
|
||||||
baseVersion=15.0
|
baseVersion=15.0
|
||||||
publishVersion=15.0.15
|
publishVersion=15.0.17
|
||||||
buildCount=0
|
buildCount=0
|
||||||
baseBetaVersion=15.0.16
|
baseBetaVersion=15.0.18
|
||||||
|
|||||||
@@ -7,10 +7,7 @@ package cc.winboll.studio.apputils;
|
|||||||
*/
|
*/
|
||||||
import android.app.Application;
|
import android.app.Application;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.widget.Toast;
|
|
||||||
import cc.winboll.studio.libappbase.GlobalApplication;
|
import cc.winboll.studio.libappbase.GlobalApplication;
|
||||||
import cc.winboll.studio.libappbase.LogUtils;
|
|
||||||
import cc.winboll.studio.libapputils.bean.DebugBean;
|
|
||||||
|
|
||||||
public class App extends GlobalApplication {
|
public class App extends GlobalApplication {
|
||||||
|
|
||||||
@@ -49,37 +46,5 @@ public class App extends GlobalApplication {
|
|||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
// 应用环境初始化, 基本调试环境
|
|
||||||
//
|
|
||||||
// 初始化日志模块
|
|
||||||
//LogUtils.init(this);
|
|
||||||
|
|
||||||
try {
|
|
||||||
// 初始化 Toast 框架
|
|
||||||
// ToastUtils.init(this);
|
|
||||||
// // 设置 Toast 布局样式
|
|
||||||
// //ToastUtils.setView(R.layout.view_toast);
|
|
||||||
// ToastUtils.setStyle(new WhiteToastStyle());
|
|
||||||
// ToastUtils.setGravity(Gravity.BOTTOM, 0, 200);
|
|
||||||
// 设置应用调试标志
|
|
||||||
DebugBean debugBean = DebugBean.loadBean(this, DebugBean.class);
|
|
||||||
if (debugBean == null) {
|
|
||||||
//ToastUtils.show("debugBean == null");
|
|
||||||
setIsDebug(false);
|
|
||||||
} else {
|
|
||||||
//ToastUtils.show("saveDebugStatus(" + String.valueOf(debugBean.isDebuging()) + ")");
|
|
||||||
setIsDebug(debugBean.isDebuging());
|
|
||||||
}
|
|
||||||
// 应用窗口管理模块参数设置
|
|
||||||
//
|
|
||||||
//mMyActivityLifecycleCallbacks = new MyActivityLifecycleCallbacks();
|
|
||||||
//registerActivityLifecycleCallbacks(mMyActivityLifecycleCallbacks);
|
|
||||||
// 设置默认 WinBoll 应用 UI 类型
|
|
||||||
//WinBollActivityManager.getInstance(this).setWinBollUI_TYPE(WinBollActivityManager.WinBollUI_TYPE.Service);
|
|
||||||
//ToastUtils.show("WinBollUI_TYPE " + getWinBollUI_TYPE());
|
|
||||||
} catch (Exception e) {
|
|
||||||
LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
|
|
||||||
Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,11 +79,11 @@ final public class MainActivity extends Activity {
|
|||||||
if (resolveInfoList.size() > 0) {
|
if (resolveInfoList.size() > 0) {
|
||||||
// 传入的Intent action在Activity清单的intent-filter的action节点里有定义
|
// 传入的Intent action在Activity清单的intent-filter的action节点里有定义
|
||||||
if (intent.getAction() != null) {
|
if (intent.getAction() != null) {
|
||||||
if (intent.getAction().equals(cc.winboll.studio.libapputils.intent.action.DEBUGVIEW)) {
|
// if (intent.getAction().equals(cc.winboll.studio.libapputils.intent.action.DEBUGVIEW)) {
|
||||||
App.setIsDebug(true);
|
// App.setIsDebug(true);
|
||||||
//ToastUtils.show!("WinBollApplication.setIsDebug(true) by action : " + intent.getAction());
|
// //ToastUtils.show!("WinBollApplication.setIsDebug(true) by action : " + intent.getAction());
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -35,5 +35,5 @@ dependencies {
|
|||||||
// SSH
|
// SSH
|
||||||
//api 'com.jcraft:jsch:0.1.55'
|
//api 'com.jcraft:jsch:0.1.55'
|
||||||
|
|
||||||
api 'cc.winboll.studio:libappbase:15.0.5'
|
api 'cc.winboll.studio:libappbase:15.0.10'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#Created by .winboll/winboll_app_build.gradle
|
#Created by .winboll/winboll_app_build.gradle
|
||||||
#Mon Mar 24 17:14:43 HKT 2025
|
#Tue Mar 25 03:48:30 HKT 2025
|
||||||
stageCount=16
|
stageCount=18
|
||||||
libraryProject=libapputils
|
libraryProject=libapputils
|
||||||
baseVersion=15.0
|
baseVersion=15.0
|
||||||
publishVersion=15.0.15
|
publishVersion=15.0.17
|
||||||
buildCount=0
|
buildCount=0
|
||||||
baseBetaVersion=15.0.16
|
baseBetaVersion=15.0.18
|
||||||
|
|||||||
@@ -1,75 +0,0 @@
|
|||||||
package cc.winboll.studio.libapputils.bean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author ZhanGSKen@QQ.COM
|
|
||||||
* @Date 2024/12/25 12:38:07
|
|
||||||
* @Describe 应用调试配置类
|
|
||||||
*/
|
|
||||||
import android.util.JsonReader;
|
|
||||||
import android.util.JsonWriter;
|
|
||||||
import cc.winboll.studio.libappbase.BaseBean;
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
public class DebugBean extends BaseBean {
|
|
||||||
|
|
||||||
public static final String TAG = "DebugBean";
|
|
||||||
|
|
||||||
// 应用是否处于正在调试状态
|
|
||||||
//
|
|
||||||
boolean isDebuging = false;
|
|
||||||
|
|
||||||
public DebugBean() {
|
|
||||||
this.isDebuging = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DebugBean(boolean isDebuging) {
|
|
||||||
this.isDebuging = isDebuging;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIsDebuging(boolean isDebuging) {
|
|
||||||
this.isDebuging = isDebuging;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isDebuging() {
|
|
||||||
return isDebuging;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getName() {
|
|
||||||
return DebugBean.class.getName();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void writeThisToJsonWriter(JsonWriter jsonWriter) throws IOException {
|
|
||||||
super.writeThisToJsonWriter(jsonWriter);
|
|
||||||
DebugBean bean = this;
|
|
||||||
jsonWriter.name("isDebuging").value(bean.isDebuging());
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean initObjectsFromJsonReader(JsonReader jsonReader, String name) throws IOException {
|
|
||||||
if (super.initObjectsFromJsonReader(jsonReader, name)) { return true; } else {
|
|
||||||
if (name.equals("isDebuging")) {
|
|
||||||
setIsDebuging(jsonReader.nextBoolean());
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BaseBean readBeanFromJsonReader(JsonReader jsonReader) throws IOException {
|
|
||||||
jsonReader.beginObject();
|
|
||||||
while (jsonReader.hasNext()) {
|
|
||||||
String name = jsonReader.nextName();
|
|
||||||
if (!initObjectsFromJsonReader(jsonReader, name)) {
|
|
||||||
jsonReader.skipValue();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 结束 JSON 对象
|
|
||||||
jsonReader.endObject();
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
package cc.winboll.studio.libapputils.intent;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author ZhanGSKen@QQ.COM
|
|
||||||
* @Date 2025/01/17 19:42:21
|
|
||||||
* @Describe 应用活动类型汇总
|
|
||||||
*/
|
|
||||||
public class action {
|
|
||||||
|
|
||||||
static final String _PRE = cc.winboll.studio.libapputils.intent.action.class.getName();
|
|
||||||
|
|
||||||
public static final String DEBUGVIEW = _PRE + ".DEBUGVIEW";
|
|
||||||
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user