Compare commits

...

18 Commits

Author SHA1 Message Date
ZhanGSKen
548dcf74ed <apputils>APK 9.3.0 release Publish. 2025-02-04 08:54:03 +08:00
ZhanGSKen
547bf894c6 更新类库 2025-02-04 08:53:03 +08:00
ZhanGSKen
09e6429726 <libapputils>Library Release 9.2.17 2025-01-23 14:51:10 +08:00
ZhanGSKen
3ad9bb262e <apputils>APK 9.2.17 release Publish. 2025-01-23 14:50:49 +08:00
ZhanGSKen
15992da22f 添加Application返回函数 2025-01-23 14:49:56 +08:00
ZhanGSKen
7fb4e665f9 <libapputils>Library Release 9.2.16 2025-01-23 14:30:38 +08:00
ZhanGSKen
6a82889926 <apputils>APK 9.2.16 release Publish. 2025-01-23 14:30:15 +08:00
ZhanGSKen
7272cc4e5b 更新类库,添加应用上下文函数 2025-01-23 14:28:54 +08:00
ZhanGSKen
1f7d112a8a <libapputils>Library Release 9.2.15 2025-01-23 14:03:05 +08:00
ZhanGSKen
936e214015 <apputils>APK 9.2.15 release Publish. 2025-01-23 14:02:45 +08:00
ZhanGSKen
46e95d1b1f 增加容错调试能力 2025-01-23 14:01:42 +08:00
ZhanGSKen
15173f7af3 <libapputils>Library Release 9.2.14 2025-01-23 04:27:34 +08:00
ZhanGSKen
6f3b6c40af <apputils>APK 9.2.14 release Publish. 2025-01-23 04:27:21 +08:00
ZhanGSKen
42ffba69e5 更新联系邮件 2025-01-23 04:26:52 +08:00
ZhanGSKen
f021e8a1a3 <libapputils>Library Release 9.2.13 2025-01-23 04:05:47 +08:00
ZhanGSKen
02ce7dedb0 <apputils>APK 9.2.13 release Publish. 2025-01-23 04:05:32 +08:00
ZhanGSKen
8e290cd5e6 应用介绍添加 Gitea 拥有者属性 2025-01-23 04:04:45 +08:00
ZhanGSKen
37f2aa5f1b <libapputils>Library Release 9.2.12 2025-01-23 03:47:38 +08:00
11 changed files with 71 additions and 44 deletions

View File

@@ -29,7 +29,7 @@ android {
// versionName 更新后需要手动设置 // versionName 更新后需要手动设置
// 项目模块目录的 build.gradle 文件的 stageCount=0 // 项目模块目录的 build.gradle 文件的 stageCount=0
// Gradle编译环境下合起来的 versionName 就是 "${versionName}.0" // Gradle编译环境下合起来的 versionName 就是 "${versionName}.0"
versionName "9.2" versionName "9.3"
if(true) { if(true) {
versionName = genVersionName("${versionName}") versionName = genVersionName("${versionName}")
} }
@@ -51,7 +51,5 @@ android {
dependencies { dependencies {
api project(':libapputils') api project(':libapputils')
api 'cc.winboll.studio:libappbase:1.1.0'
api fileTree(dir: 'libs', include: ['*.jar']) api fileTree(dir: 'libs', include: ['*.jar'])
} }

View File

@@ -1,8 +1,8 @@
#Created by .winboll/winboll_app_build.gradle #Created by .winboll/winboll_app_build.gradle
#Thu Jan 23 03:47:26 HKT 2025 #Tue Feb 04 08:54:03 HKT 2025
stageCount=13 stageCount=1
libraryProject=libapputils libraryProject=libapputils
baseVersion=9.2 baseVersion=9.3
publishVersion=9.2.12 publishVersion=9.3.0
buildCount=0 buildCount=0
baseBetaVersion=9.2.13 baseBetaVersion=9.3.1

View File

@@ -5,10 +5,8 @@ package cc.winboll.studio.apputils;
* @Date 2024/12/08 15:10:51 * @Date 2024/12/08 15:10:51
* @Describe 全局应用类 * @Describe 全局应用类
*/ */
import android.view.Gravity; import android.widget.Toast;
import cc.winboll.studio.libapputils.app.WinBollGlobalApplication; import cc.winboll.studio.libapputils.app.WinBollGlobalApplication;
import com.hjq.toast.ToastUtils;
import com.hjq.toast.style.WhiteToastStyle;
public class App extends WinBollGlobalApplication { public class App extends WinBollGlobalApplication {
@@ -19,6 +17,7 @@ public class App extends WinBollGlobalApplication {
@Override @Override
public void onCreate() { public void onCreate() {
super.onCreate(); super.onCreate();
Toast.makeText(getApplication(), "Toast Test", Toast.LENGTH_SHORT).show();
} }
} }

View File

@@ -174,6 +174,7 @@ final public class MainActivity extends WinBollActivity {
appInfo.setAppIcon(cc.winboll.studio.libapputils.R.drawable.ic_winboll); appInfo.setAppIcon(cc.winboll.studio.libapputils.R.drawable.ic_winboll);
appInfo.setAppDescription("APPUtils Description"); appInfo.setAppDescription("APPUtils Description");
appInfo.setAppGitName("APP"); appInfo.setAppGitName("APP");
appInfo.setAppGitOwner("Studio");
appInfo.setAppGitAPPBranch("apputils"); appInfo.setAppGitAPPBranch("apputils");
appInfo.setAppGitAPPSubProjectFolder("apputils"); appInfo.setAppGitAPPSubProjectFolder("apputils");
appInfo.setAppHomePage("https://www.winboll.cc/studio/details.php?app=APP"); appInfo.setAppHomePage("https://www.winboll.cc/studio/details.php?app=APP");

View File

@@ -38,7 +38,7 @@ dependencies {
api 'androidx.fragment:fragment:1.0.0' api 'androidx.fragment:fragment:1.0.0'
api 'com.google.android.material:material:1.0.0' api 'com.google.android.material:material:1.0.0'
api 'cc.winboll.studio:libappbase:1.1.0' api 'cc.winboll.studio:libappbase:1.1.3'
api fileTree(dir: 'libs', include: ['*.jar']) api fileTree(dir: 'libs', include: ['*.jar'])
} }

View File

@@ -1,8 +1,8 @@
#Created by .winboll/winboll_app_build.gradle #Created by .winboll/winboll_app_build.gradle
#Thu Jan 23 03:47:26 HKT 2025 #Tue Feb 04 08:54:03 HKT 2025
stageCount=13 stageCount=1
libraryProject=libapputils libraryProject=libapputils
baseVersion=9.2 baseVersion=9.3
publishVersion=9.2.12 publishVersion=9.3.0
buildCount=0 buildCount=0
baseBetaVersion=9.2.13 baseBetaVersion=9.3.1

View File

@@ -8,7 +8,6 @@ import android.app.Activity;
import android.app.Application; import android.app.Application;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import cc.winboll.studio.GlobalApplication;
import cc.winboll.studio.libapputils.log.LogUtils; import cc.winboll.studio.libapputils.log.LogUtils;
import com.hjq.toast.ToastUtils; import com.hjq.toast.ToastUtils;
import android.content.Context; import android.content.Context;

View File

@@ -3,11 +3,12 @@ package cc.winboll.studio.libapputils.app;
import android.app.Application; import android.app.Application;
import android.content.Context; import android.content.Context;
import android.view.Gravity; import android.view.Gravity;
import android.widget.Toast;
import cc.winboll.studio.libappbase.GlobalApplication;
import cc.winboll.studio.libapputils.bean.DebugBean; import cc.winboll.studio.libapputils.bean.DebugBean;
import cc.winboll.studio.libapputils.log.LogUtils; import cc.winboll.studio.libapputils.log.LogUtils;
import com.hjq.toast.ToastUtils; import com.hjq.toast.ToastUtils;
import com.hjq.toast.style.WhiteToastStyle; import com.hjq.toast.style.WhiteToastStyle;
import cc.winboll.studio.GlobalApplication;
public class WinBollGlobalApplication extends GlobalApplication { public class WinBollGlobalApplication extends GlobalApplication {
@@ -53,6 +54,16 @@ public class WinBollGlobalApplication extends GlobalApplication {
return mMyActivityLifecycleCallbacks; return mMyActivityLifecycleCallbacks;
} }
@Override
public Context getApplicationContext() {
return super.getApplicationContext();
}
@Override
public Application getApplication() {
return this;
}
@Override @Override
public void onCreate() { public void onCreate() {
super.onCreate(); super.onCreate();
@@ -61,27 +72,32 @@ public class WinBollGlobalApplication extends GlobalApplication {
// 初始化日志模块 // 初始化日志模块
LogUtils.init(this); LogUtils.init(this);
// 初始化 Toast 框架 try {
ToastUtils.init(this); // 初始化 Toast 框架
// 设置 Toast 布局样式 ToastUtils.init(this);
//ToastUtils.setView(R.layout.view_toast); // 设置 Toast 布局样式
ToastUtils.setStyle(new WhiteToastStyle()); //ToastUtils.setView(R.layout.view_toast);
ToastUtils.setGravity(Gravity.BOTTOM, 0, 200); ToastUtils.setStyle(new WhiteToastStyle());
// 设置应用调试标志 ToastUtils.setGravity(Gravity.BOTTOM, 0, 200);
DebugBean debugBean = DebugBean.loadBean(this, DebugBean.class); // 设置应用调试标志
if (debugBean == null) { DebugBean debugBean = DebugBean.loadBean(this, DebugBean.class);
//ToastUtils.show("debugBean == null"); if (debugBean == null) {
setIsDebug(false); //ToastUtils.show("debugBean == null");
} else { setIsDebug(false);
//ToastUtils.show("saveDebugStatus(" + String.valueOf(debugBean.isDebuging()) + ")"); } else {
setIsDebug(debugBean.isDebuging()); //ToastUtils.show("saveDebugStatus(" + String.valueOf(debugBean.isDebuging()) + ")");
setIsDebug(debugBean.isDebuging());
}
// 应用窗口管理模块参数设置
//
mMyActivityLifecycleCallbacks = new MyActivityLifecycleCallbacks();
registerActivityLifecycleCallbacks(mMyActivityLifecycleCallbacks);
// 设置默认 WinBoll 应用 UI 类型
setWinBollUI_TYPE(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();
} }
// 应用窗口管理模块参数设置
//
mMyActivityLifecycleCallbacks = new MyActivityLifecycleCallbacks();
registerActivityLifecycleCallbacks(mMyActivityLifecycleCallbacks);
// 设置默认 WinBoll 应用 UI 类型
setWinBollUI_TYPE(WinBollUI_TYPE.Service);
//ToastUtils.show("WinBollUI_TYPE " + getWinBollUI_TYPE());
} }
} }

View File

@@ -20,6 +20,8 @@ public class APPInfo implements Serializable {
String appDescription; String appDescription;
// 应用Git仓库地址 // 应用Git仓库地址
String appGitName; String appGitName;
// 应用Git仓库拥有者
String appGitOwner;
// 应用Git仓库分支 // 应用Git仓库分支
String appGitAPPBranch; String appGitAPPBranch;
// 应用Git仓库子项目文件夹 // 应用Git仓库子项目文件夹
@@ -31,11 +33,12 @@ public class APPInfo implements Serializable {
// 应用包存储文件夹名称 // 应用包存储文件夹名称
String appAPKFolderName; String appAPKFolderName;
public APPInfo(String appName, int appIcon, String appDescription, String appGitName, String appGitAPPBranch, String appGitAPPSubProjectFolder, String appHomePage, String appAPKName, String appAPKFolderName) { public APPInfo(String appName, int appIcon, String appDescription, String appGitName, String appGitOwner, String appGitAPPBranch, String appGitAPPSubProjectFolder, String appHomePage, String appAPKName, String appAPKFolderName) {
this.appName = appName; this.appName = appName;
this.appIcon = appIcon; this.appIcon = appIcon;
this.appDescription = appDescription; this.appDescription = appDescription;
this.appGitName = appGitName; this.appGitName = appGitName;
this.appGitOwner = appGitOwner;
this.appGitAPPBranch = appGitAPPBranch; this.appGitAPPBranch = appGitAPPBranch;
this.appGitAPPSubProjectFolder = appGitAPPSubProjectFolder; this.appGitAPPSubProjectFolder = appGitAPPSubProjectFolder;
this.appHomePage = appHomePage; this.appHomePage = appHomePage;
@@ -48,6 +51,7 @@ public class APPInfo implements Serializable {
this.appIcon = R.drawable.ic_launcher; this.appIcon = R.drawable.ic_launcher;
this.appDescription = "WinBoll APP"; this.appDescription = "WinBoll APP";
this.appGitName = "APP"; this.appGitName = "APP";
this.appGitOwner = "Studio";
this.appGitAPPBranch = "app"; this.appGitAPPBranch = "app";
this.appGitAPPSubProjectFolder = "app"; this.appGitAPPSubProjectFolder = "app";
this.appHomePage = "https://www.winboll.cc/studio/details.php?app=APP"; this.appHomePage = "https://www.winboll.cc/studio/details.php?app=APP";
@@ -55,6 +59,14 @@ public class APPInfo implements Serializable {
this.appAPKFolderName = "APP"; this.appAPKFolderName = "APP";
} }
public void setAppGitOwner(String appGitOwner) {
this.appGitOwner = appGitOwner;
}
public String getAppGitOwner() {
return appGitOwner;
}
public void setAppGitAPPBranch(String appGitAPPBranch) { public void setAppGitAPPBranch(String appGitAPPBranch) {
this.appGitAPPBranch = appGitAPPBranch; this.appGitAPPBranch = appGitAPPBranch;
} }

View File

@@ -88,6 +88,7 @@ public class AboutView extends LinearLayout {
appInfo.setAppAPKFolderName(typedArray.getString(R.styleable.AboutView_app_apkfoldername)); appInfo.setAppAPKFolderName(typedArray.getString(R.styleable.AboutView_app_apkfoldername));
appInfo.setAppAPKName(typedArray.getString(R.styleable.AboutView_app_apkname)); appInfo.setAppAPKName(typedArray.getString(R.styleable.AboutView_app_apkname));
appInfo.setAppGitName(typedArray.getString(R.styleable.AboutView_app_gitname)); appInfo.setAppGitName(typedArray.getString(R.styleable.AboutView_app_gitname));
appInfo.setAppGitOwner(typedArray.getString(R.styleable.AboutView_app_gitowner));
appInfo.setAppGitAPPBranch(typedArray.getString(R.styleable.AboutView_app_gitappbranch)); appInfo.setAppGitAPPBranch(typedArray.getString(R.styleable.AboutView_app_gitappbranch));
appInfo.setAppGitAPPSubProjectFolder(typedArray.getString(R.styleable.AboutView_app_gitappsubprojectfolder)); appInfo.setAppGitAPPSubProjectFolder(typedArray.getString(R.styleable.AboutView_app_gitappsubprojectfolder));
appInfo.setAppDescription(typedArray.getString(R.styleable.AboutView_appdescription)); appInfo.setAppDescription(typedArray.getString(R.styleable.AboutView_appdescription));
@@ -114,7 +115,7 @@ public class AboutView extends LinearLayout {
} }
mszCurrentAppPackageName = mszAppAPKName + "_" + mszAppVersionName + ".apk"; mszCurrentAppPackageName = mszAppAPKName + "_" + mszAppVersionName + ".apk";
mszHomePage = mszWinBollServerHost + "/studio/details.php?app=" + mszAppAPKFolderName; mszHomePage = mszWinBollServerHost + "/studio/details.php?app=" + mszAppAPKFolderName;
mszGitea = "https://gitea.winboll.cc/Studio/" + mszAppGitName + "/src/branch/" + mAPPInfo.getAppGitAPPBranch() + "/" + mAPPInfo.getAppGitAPPSubProjectFolder(); mszGitea = "https://gitea.winboll.cc/" + mAPPInfo.getAppGitOwner() + "/" + mszAppGitName + "/src/branch/" + mAPPInfo.getAppGitAPPBranch() + "/" + mAPPInfo.getAppGitAPPSubProjectFolder();
if (WinBollGlobalApplication.isDebug()) { if (WinBollGlobalApplication.isDebug()) {
LayoutInflater inflater = LayoutInflater.from(mContext); LayoutInflater inflater = LayoutInflater.from(mContext);
@@ -239,7 +240,7 @@ public class AboutView extends LinearLayout {
//.addItem(versionElement) //.addItem(versionElement)
//.addItem(adsElement) //.addItem(adsElement)
//.addGroup("Connect with us") //.addGroup("Connect with us")
.addEmail("ZhanGSKen@QQ.COM") .addEmail("ZhanGSKen@AliYun.Com")
.addWebsite(mszHomePage) .addWebsite(mszHomePage)
.addItem(elementAppMode) .addItem(elementAppMode)
.addItem(elementGitWeb) .addItem(elementGitWeb)

View File

@@ -5,6 +5,7 @@
<attr name="app_apkfoldername" format="string" /> <attr name="app_apkfoldername" format="string" />
<attr name="app_apkname" format="string" /> <attr name="app_apkname" format="string" />
<attr name="app_gitname" format="string" /> <attr name="app_gitname" format="string" />
<attr name="app_gitowner" format="string" />
<attr name="app_gitappbranch" format="string" /> <attr name="app_gitappbranch" format="string" />
<attr name="app_gitappsubprojectfolder" format="string" /> <attr name="app_gitappsubprojectfolder" format="string" />
<attr name="appdescription" format="string" /> <attr name="appdescription" format="string" />