资源化配置Bobulltoon数据地址。
This commit is contained in:
parent
31595fe1ae
commit
840da14438
@ -1,8 +1,8 @@
|
|||||||
#Created by .winboll/winboll_app_build.gradle
|
#Created by .winboll/winboll_app_build.gradle
|
||||||
#Mon Apr 14 11:50:54 GMT 2025
|
#Mon Apr 14 12:09:37 GMT 2025
|
||||||
stageCount=8
|
stageCount=8
|
||||||
libraryProject=
|
libraryProject=
|
||||||
baseVersion=15.2
|
baseVersion=15.2
|
||||||
publishVersion=15.2.7
|
publishVersion=15.2.7
|
||||||
buildCount=12
|
buildCount=14
|
||||||
baseBetaVersion=15.2.8
|
baseBetaVersion=15.2.8
|
||||||
|
@ -236,6 +236,8 @@ public class SettingsActivity extends AppCompatActivity implements IWinBollActiv
|
|||||||
|
|
||||||
public void onResetBoBullToonURL(View view) {
|
public void onResetBoBullToonURL(View view) {
|
||||||
Rules.getInstance(this).resetDefaultBoBullToonURL();
|
Rules.getInstance(this).resetDefaultBoBullToonURL();
|
||||||
|
EditText etBoBullToonURL = findViewById(R.id.bobulltoonurl_et);
|
||||||
|
etBoBullToonURL.setText(Rules.getInstance(this).getBoBullToonURL());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onDownloadBoBullToon(View view) {
|
public void onDownloadBoBullToon(View view) {
|
||||||
|
@ -14,7 +14,6 @@ import cc.winboll.studio.contacts.utils.IntUtils;
|
|||||||
public class SettingsModel extends BaseBean {
|
public class SettingsModel extends BaseBean {
|
||||||
|
|
||||||
public static final String TAG = "SettingsModel";
|
public static final String TAG = "SettingsModel";
|
||||||
public static final String DEFAULT_BOBULLTOON_URL = "http://10.8.0.12:3000/Studio/BoBullToon/archive/main.zip"; // 替换为实际的 ZIP 文件 URL
|
|
||||||
|
|
||||||
public static final int MAX_INTRANGE = 666666;
|
public static final int MAX_INTRANGE = 666666;
|
||||||
public static final int MIN_INTRANGE = 1;
|
public static final int MIN_INTRANGE = 1;
|
||||||
@ -38,7 +37,7 @@ public class SettingsModel extends BaseBean {
|
|||||||
this.dunResumeSecondCount = 60;
|
this.dunResumeSecondCount = 60;
|
||||||
this.dunResumeCount = 1;
|
this.dunResumeCount = 1;
|
||||||
this.isEnableDun = false;
|
this.isEnableDun = false;
|
||||||
this.szBoBullToon_URL = DEFAULT_BOBULLTOON_URL;
|
this.szBoBullToon_URL = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public SettingsModel(int dunTotalCount, int dunCurrentCount, int dunResumeSecondCount, int dunResumeCount, boolean isEnableDun, String szBoBullToon_URL) {
|
public SettingsModel(int dunTotalCount, int dunCurrentCount, int dunResumeSecondCount, int dunResumeCount, boolean isEnableDun, String szBoBullToon_URL) {
|
||||||
|
@ -6,6 +6,7 @@ package cc.winboll.studio.contacts.bobulltoon;
|
|||||||
* @Describe 汤姆猫管家 :使用 BoBullToon 项目,对通讯地址进行筛选判断的好朋友。
|
* @Describe 汤姆猫管家 :使用 BoBullToon 项目,对通讯地址进行筛选判断的好朋友。
|
||||||
*/
|
*/
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import cc.winboll.studio.contacts.R;
|
||||||
import cc.winboll.studio.contacts.dun.Rules;
|
import cc.winboll.studio.contacts.dun.Rules;
|
||||||
import cc.winboll.studio.libappbase.LogUtils;
|
import cc.winboll.studio.libappbase.LogUtils;
|
||||||
import com.hjq.toast.ToastUtils;
|
import com.hjq.toast.ToastUtils;
|
||||||
@ -44,6 +45,10 @@ public class TomCat {
|
|||||||
return _TomCat;
|
return _TomCat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getDefaultBobulltoonUrl() {
|
||||||
|
return mContext.getString(R.string.default_bobulltoon_url);
|
||||||
|
}
|
||||||
|
|
||||||
boolean downloadAndExtractZip(String zipUrl, String destinationFolder) throws IOException {
|
boolean downloadAndExtractZip(String zipUrl, String destinationFolder) throws IOException {
|
||||||
OkHttpClient client = new OkHttpClient();
|
OkHttpClient client = new OkHttpClient();
|
||||||
Request request = new Request.Builder()
|
Request request = new Request.Builder()
|
||||||
|
@ -18,6 +18,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.Timer;
|
import java.util.Timer;
|
||||||
import java.util.TimerTask;
|
import java.util.TimerTask;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
import cc.winboll.studio.contacts.bobulltoon.TomCat;
|
||||||
|
|
||||||
public class Rules {
|
public class Rules {
|
||||||
|
|
||||||
@ -85,7 +86,7 @@ public class Rules {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void resetDefaultBoBullToonURL() {
|
public void resetDefaultBoBullToonURL() {
|
||||||
mSettingsModel.setBoBullToon_URL(SettingsModel.DEFAULT_BOBULLTOON_URL);
|
mSettingsModel.setBoBullToon_URL(TomCat.getInstance(mContext).getDefaultBobulltoonUrl());
|
||||||
saveDun();
|
saveDun();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,5 +2,6 @@
|
|||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<string name="app_name">Contacts</string>
|
<string name="app_name">Contacts</string>
|
||||||
|
<string name="default_bobulltoon_url">http://10.8.0.12:3000/Studio/BoBullToon/archive/main.zip</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user