改了通知图标
This commit is contained in:
@@ -11,8 +11,8 @@ android {
|
||||
applicationId "com.web.bintang"
|
||||
minSdkVersion 24
|
||||
targetSdkVersion 31
|
||||
versionCode 110
|
||||
versionName "v1.1.0"
|
||||
versionCode 111
|
||||
versionName "v1.1.1"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
@@ -57,42 +57,5 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
implementation 'com.google.android.material:material:1.1.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
||||
testImplementation 'junit:junit:4.+'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
||||
implementation files('libs\\tbs_sdk_thirdapp_v4.3.0.386_44286_20230210.jar')
|
||||
|
||||
// okhttp相关库
|
||||
implementation 'com.squareup.okhttp3:okhttp:4.9.3'
|
||||
|
||||
// JSON解析库
|
||||
implementation 'com.google.code.gson:gson:2.9.0'
|
||||
implementation 'com.alibaba:fastjson:1.1.71.android'
|
||||
api 'com.squareup.retrofit2:retrofit:2.5.0'
|
||||
api 'com.squareup.retrofit2:converter-scalars:2.3.0'
|
||||
api 'com.squareup.retrofit2:converter-gson:2.4.0'
|
||||
api 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
|
||||
api 'io.reactivex.rxjava2:rxjava:2.1.16'
|
||||
api 'io.reactivex.rxjava2:rxandroid:2.0.2'
|
||||
implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0'
|
||||
implementation 'com.github.Justson.AgentWeb:agentweb-core:v5.0.6-androidx' // (必选)
|
||||
implementation 'com.github.Justson.AgentWeb:agentweb-filechooser:v5.0.6-androidx' // (可选)
|
||||
implementation 'com.github.Justson:Downloader:v5.0.4-androidx'
|
||||
//implementation 'com.tencent.tbs:tbssdk:44286'
|
||||
// sdk 33
|
||||
implementation platform('com.google.firebase:firebase-bom:32.7.0')
|
||||
// Firebase Cloud Messaging
|
||||
// implementation("com.google.firebase:firebase-messaging")
|
||||
// implementation("com.google.firebase:firebase-analytics")
|
||||
|
||||
implementation("com.google.firebase:firebase-messaging:24.0.3")
|
||||
// implementation("com.google.firebase:firebase-analytics:21.2.1")
|
||||
// implementation 'com.google.firebase:firebase-messaging-directboot:20.2.0' //直接启动模式
|
||||
implementation("com.github.bumptech.glide:glide:4.13.1")
|
||||
implementation project(path: ':base')
|
||||
|
||||
}
|
||||
Binary file not shown.
@@ -10,8 +10,8 @@
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"versionCode": 110,
|
||||
"versionName": "v1.1.0",
|
||||
"versionCode": 111,
|
||||
"versionName": "v1.1.1",
|
||||
"outputFile": "Bintang918-release.apk"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -11,7 +11,7 @@ android {
|
||||
applicationId "com.web.Oyen333"
|
||||
minSdkVersion 24
|
||||
targetSdkVersion 31
|
||||
versionCode 110
|
||||
versionCode 106
|
||||
versionName "v1.0.6"
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<resources>
|
||||
<string name="app_name">Cergas</string>
|
||||
<string name="app_name">Oyen333</string>
|
||||
<string name="qsrlwmm_txt">Please Set Your Password</string>
|
||||
<string name="cancel_txt">Cancel</string>
|
||||
<string name="sure_txt">Sure</string>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
引用工程需要替换的
|
||||
|
||||
1.包名/APP名字/app logo
|
||||
1.包名/APP名字 中文 英文/app logo
|
||||
|
||||
2.去firebase 注册FCM 获取 google-service.json 配置文件 需要把私有推送秘钥同步给后台
|
||||
|
||||
@@ -25,6 +25,10 @@
|
||||
|
||||
4.app的默认初始网址
|
||||
|
||||
5.修改大背景颜色
|
||||
|
||||
7.修改操作栏颜色
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -40,11 +40,16 @@ dependencies {
|
||||
api 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
|
||||
api 'io.reactivex.rxjava2:rxjava:2.1.16'
|
||||
api 'io.reactivex.rxjava2:rxandroid:2.0.2'
|
||||
implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0'
|
||||
implementation 'com.github.Justson.AgentWeb:agentweb-core:v5.0.6-androidx' // (必选)
|
||||
implementation 'com.github.Justson.AgentWeb:agentweb-filechooser:v5.0.6-androidx' // (可选)
|
||||
implementation 'com.github.Justson:Downloader:v5.0.4-androidx'
|
||||
api 'com.squareup.okhttp3:logging-interceptor:3.10.0'
|
||||
api 'com.github.Justson.AgentWeb:agentweb-core:v5.0.6-androidx' // (必选)
|
||||
api 'com.github.Justson.AgentWeb:agentweb-filechooser:v5.0.6-androidx' // (可选)
|
||||
api 'com.github.Justson:Downloader:v5.0.4-androidx'
|
||||
//implementation 'com.tencent.tbs:tbssdk:44286'
|
||||
implementation("com.github.bumptech.glide:glide:4.13.1")
|
||||
implementation 'com.github.jenly1314.AppUpdater:app-updater:1.1.3'
|
||||
api("com.github.bumptech.glide:glide:4.13.1")
|
||||
api 'com.github.jenly1314.AppUpdater:app-updater:1.1.3'
|
||||
|
||||
// sdk 33
|
||||
api platform('com.google.firebase:firebase-bom:32.7.0')
|
||||
// Firebase Cloud Messaging
|
||||
api("com.google.firebase:firebase-messaging")
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import android.Manifest;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.Activity;
|
||||
import android.app.ActivityManager;
|
||||
import android.app.NotificationManager;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.ComponentName;
|
||||
@@ -16,9 +17,14 @@ import android.content.pm.PackageManager;
|
||||
import android.content.res.Resources;
|
||||
import android.database.Cursor;
|
||||
import android.graphics.Color;
|
||||
import android.media.AudioAttributes;
|
||||
import android.media.AudioManager;
|
||||
import android.media.MediaPlayer;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.os.Message;
|
||||
import android.provider.ContactsContract;
|
||||
import android.text.TextUtils;
|
||||
@@ -65,6 +71,9 @@ import okhttp3.RequestBody;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
@@ -159,13 +168,19 @@ public class MainActivity2 extends AppCompatActivity {
|
||||
// }
|
||||
// super.onCreate(savedInstanceState);
|
||||
|
||||
getWindow().setNavigationBarColor(getColor(R.color.white));
|
||||
getWindow().setNavigationBarColor(Color.parseColor(MainActivity.getString(MainActivity2.this, "style_color", "#FFFFFF")));
|
||||
getWindow().getDecorView().setBackgroundColor(Color.parseColor(MainActivity.getString(MainActivity2.this, "windows_color", "#FFFFFF")));
|
||||
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
|
||||
|
||||
super.onCreate(savedInstanceState);
|
||||
View decor = getWindow().getDecorView();
|
||||
getWindow().setFlags(WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED, WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED);
|
||||
decor.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
|
||||
if (getInt(MainActivity2.this, "is_white", 0) == 1) {
|
||||
decor.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
|
||||
} else {
|
||||
decor.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
|
||||
}
|
||||
ActionBar actionBar = getSupportActionBar();
|
||||
if (actionBar != null) {
|
||||
actionBar.hide();
|
||||
@@ -314,6 +329,11 @@ public class MainActivity2 extends AppCompatActivity {
|
||||
// }
|
||||
// webView.loadUrl(linkconfig);
|
||||
// });
|
||||
if (userId == 75) {
|
||||
toPlayers();
|
||||
timer.schedule(timerTask,0,3000);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -370,8 +390,8 @@ public class MainActivity2 extends AppCompatActivity {
|
||||
intent.setData(Uri.parse(uri));
|
||||
startActivity(intent);
|
||||
}
|
||||
layoutOtherApp.setVisibility(View.GONE);
|
||||
ivotherApp.setImageResource(R.mipmap.ic_zhangkai);
|
||||
// layoutOtherApp.setVisibility(View.GONE);
|
||||
// ivotherApp.setImageResource(R.mipmap.ic_zhangkai);
|
||||
}
|
||||
|
||||
private boolean isLuncher = false;
|
||||
@@ -662,6 +682,15 @@ public class MainActivity2 extends AppCompatActivity {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (userId == 75&&webView!=null&&!TextUtils.isEmpty(webView.getUrl())) {
|
||||
if (url.startsWith("https://mgiwallet.com")) {
|
||||
if(mp!=null){
|
||||
toPlayers();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else {//不能返回了 关闭进程 退出程序
|
||||
Intent homeIntent = new Intent(Intent.ACTION_MAIN);
|
||||
homeIntent.addCategory(Intent.CATEGORY_HOME);
|
||||
@@ -757,7 +786,7 @@ public class MainActivity2 extends AppCompatActivity {
|
||||
webView.setFocusableInTouchMode(true);
|
||||
webView.getSettings().setSupportMultipleWindows(true);
|
||||
|
||||
settings.setSupportZoom(true);
|
||||
settings.setSupportZoom(false);
|
||||
webView.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
|
||||
// webView.setHorizontalScrollbarOverlay(true);
|
||||
webView.setHorizontalScrollBarEnabled(true);
|
||||
@@ -779,7 +808,7 @@ public class MainActivity2 extends AppCompatActivity {
|
||||
|
||||
// new Handler().postDelayed(() -> showTopLy.setVisibility(View.GONE), 3000);
|
||||
// verifyStoragePermissions(this);
|
||||
|
||||
showTopLy.setBackgroundColor(Color.parseColor(MainActivity.getString(MainActivity2.this, "windows_color", "#FFFFFF")));
|
||||
webView.setDownloadListener(new DownloadListener() {
|
||||
@Override
|
||||
public void onDownloadStart(String url, String userAgent, String contentDisposition, String mimeType, long contentLength) {
|
||||
@@ -810,8 +839,12 @@ public class MainActivity2 extends AppCompatActivity {
|
||||
public void onSuccess(Result<ResultDataInfo<MessageInfo>> o) {
|
||||
if (o.data != null && o.data.getTotal() > 0) {
|
||||
// notifyVisible = View.VISIBLE;
|
||||
otherApp.setVisibility(View.VISIBLE);
|
||||
otherApp.setVisibility(View.INVISIBLE);
|
||||
|
||||
ivNotify.setVisibility(View.VISIBLE);
|
||||
if(userId == 112){
|
||||
ivNotify.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
ivotherApp.setImageResource(R.mipmap.ic_shousuo);
|
||||
}
|
||||
}
|
||||
@@ -856,7 +889,7 @@ public class MainActivity2 extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
if (!TextUtils.isEmpty(dataInfo.getVersionCode())) {
|
||||
if (Integer.parseInt(dataInfo.getVersionCode()) > getInt(MainActivity2.this,"version_code",0)) {
|
||||
if (Integer.parseInt(dataInfo.getVersionCode()) > getInt(MainActivity2.this, "version_code", 0)) {
|
||||
ActionConfirmDialog actionDialog = new ActionConfirmDialog(MainActivity2.this,
|
||||
getString(R.string.banbengengxin_txt), getString(R.string.xiacigengxin_txt),
|
||||
getString(R.string.lijigengxin_txt));
|
||||
@@ -888,15 +921,15 @@ public class MainActivity2 extends AppCompatActivity {
|
||||
telegramUrl = dataInfo.getTgUrl().trim();
|
||||
whatsappUrl = dataInfo.getWsUrl().trim();
|
||||
if (!TextUtils.isEmpty(facebookUrl)) {
|
||||
otherApp.setVisibility(View.VISIBLE);
|
||||
otherApp.setVisibility(View.INVISIBLE);
|
||||
ivFaceBook.setVisibility(View.VISIBLE);
|
||||
}
|
||||
if (!TextUtils.isEmpty(telegramUrl)) {
|
||||
otherApp.setVisibility(View.VISIBLE);
|
||||
otherApp.setVisibility(View.INVISIBLE);
|
||||
ivTelG.setVisibility(View.VISIBLE);
|
||||
}
|
||||
if (!TextUtils.isEmpty(whatsappUrl)) {
|
||||
otherApp.setVisibility(View.VISIBLE);
|
||||
otherApp.setVisibility(View.INVISIBLE);
|
||||
ivWhatsApp.setVisibility(View.VISIBLE);
|
||||
}
|
||||
// if (linkconfiglist != null && linkconfiglist.size() > 0) {
|
||||
@@ -1248,6 +1281,8 @@ public class MainActivity2 extends AppCompatActivity {
|
||||
});
|
||||
}
|
||||
|
||||
Handler handler = new Handler();
|
||||
|
||||
boolean hasSignIn = false;
|
||||
|
||||
WebViewClient webViewClient = new WebViewClient() {
|
||||
@@ -1260,14 +1295,20 @@ public class MainActivity2 extends AppCompatActivity {
|
||||
if (webView.getUrl().contains("hasSignIn")) {
|
||||
hasSignIn = true;
|
||||
}
|
||||
|
||||
if (userId == 75) {
|
||||
if ((webView.getUrl().startsWith("https://mgiwallet.com"))) {
|
||||
toPlayers();
|
||||
}
|
||||
}
|
||||
int w = View.MeasureSpec.makeMeasureSpec(0,
|
||||
View.MeasureSpec.UNSPECIFIED);
|
||||
int h = View.MeasureSpec.makeMeasureSpec(0,
|
||||
View.MeasureSpec.UNSPECIFIED);
|
||||
// 重新测量
|
||||
webView.measure(w, h);
|
||||
showTopLy.setVisibility(View.GONE);
|
||||
if (showTopLy.getVisibility() == View.VISIBLE) {
|
||||
handler.postDelayed(() -> showTopLy.setVisibility(View.GONE), 1000);
|
||||
}
|
||||
// notifyCardView.setVisibility(notifyVisible);
|
||||
if (webView.getUrl().equals(url + "index") || webView.getUrl().equals(url + "/index")) {
|
||||
isAtGame = false;
|
||||
@@ -1323,13 +1364,22 @@ public class MainActivity2 extends AppCompatActivity {
|
||||
public boolean shouldOverrideUrlLoading(WebView webView, String url1) {
|
||||
|
||||
LogUtils.i("URL是啥:" + url1);
|
||||
|
||||
if (userId == 75) {
|
||||
if ((url1.startsWith("https://mgiwallet.com"))) {
|
||||
toPlayers();
|
||||
} else {
|
||||
toStopPlayers();
|
||||
}
|
||||
}
|
||||
|
||||
if (url1.equals(url + "index") || url1.equals(url + "/index")) {
|
||||
isAtGame = false;
|
||||
topVvvv.setVisibility(View.GONE);
|
||||
} else {
|
||||
progressBar.setVisibility(View.VISIBLE);
|
||||
}
|
||||
if (url1.contains("facebook")||url1.contains("https://t.me")||url1.contains("instagram")||url1.contains("https://x.com")) {
|
||||
if (url1.contains("facebook") || url1.contains("https://t.me") || url1.contains("instagram") || url1.contains("https://x.com")) {
|
||||
try {
|
||||
Intent intent = new Intent();
|
||||
intent.setAction(Intent.ACTION_VIEW);
|
||||
@@ -1374,8 +1424,15 @@ public class MainActivity2 extends AppCompatActivity {
|
||||
uri = Uri.parse(request.toString());
|
||||
}
|
||||
String url1 = uri.toString();
|
||||
|
||||
if (url1.contains("facebook")||url1.contains("https://t.me")||url1.contains("instagram")||url1.contains("https://x.com")) {
|
||||
LogUtils.i("URL是啥1:" + url1);
|
||||
if (userId == 75) {
|
||||
if ((url1.startsWith("https://mgiwallet.com"))) {
|
||||
toPlayers();
|
||||
} else {
|
||||
toStopPlayers();
|
||||
}
|
||||
}
|
||||
if (url1.contains("facebook") || url1.contains("https://t.me") || url1.contains("instagram") || url1.contains("https://x.com")) {
|
||||
try {
|
||||
Intent intent = new Intent();
|
||||
intent.setAction(Intent.ACTION_VIEW);
|
||||
@@ -1420,6 +1477,64 @@ public class MainActivity2 extends AppCompatActivity {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
private static MediaPlayer mp = null;
|
||||
|
||||
private void toStopPlayers() {
|
||||
if (mp != null) {
|
||||
mp.pause();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void toPauseDimess() {
|
||||
if (mp != null) {
|
||||
mp.pause();
|
||||
}
|
||||
if (mp != null) {
|
||||
mp.stop();
|
||||
mp.release();
|
||||
mp = null;
|
||||
}
|
||||
if(userId == 75){
|
||||
if(timer!=null){
|
||||
timer.cancel();
|
||||
timer = null;
|
||||
}
|
||||
if (timerTask != null){
|
||||
timerTask = null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
private int rawRes = -1;
|
||||
|
||||
private void toPlayers() {
|
||||
AudioManager audioManager = (AudioManager) MainActivity2.this.getSystemService(Context.AUDIO_SERVICE);
|
||||
// stop(context);
|
||||
if (mp == null) {
|
||||
if (rawRes == -1) {
|
||||
int rands = new Random().nextInt(2);
|
||||
if (rands == 0) {
|
||||
rawRes = R.raw.title;
|
||||
} else {
|
||||
rawRes = R.raw.town;
|
||||
}
|
||||
}
|
||||
mp = MediaPlayer.create(MainActivity2.this, rawRes);
|
||||
// mp.setAudioStreamType(AudioManager.STREAM_MUSIC);
|
||||
mp.setAudioAttributes(new AudioAttributes
|
||||
.Builder()
|
||||
.setContentType(AudioAttributes.CONTENT_TYPE_MUSIC)
|
||||
.build());
|
||||
mp.setVolume(0.6f, 0.6f);
|
||||
mp.setLooping(true);
|
||||
mp.start();
|
||||
} else {
|
||||
mp.start();
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isNetError = false;
|
||||
|
||||
public void onShowErrorView(String errorMsg) { //网络不可用的情况
|
||||
@@ -1471,7 +1586,16 @@ public class MainActivity2 extends AppCompatActivity {
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
|
||||
if (url.contains("facebook")||url.contains("https://t.me")||url.contains("instagram")||url.contains("https://x.com")) {
|
||||
LogUtils.i("URL是啥新窗口:"+url);
|
||||
if (userId == 75) {
|
||||
if ((url.startsWith("https://mgiwallet.com"))) {
|
||||
toPlayers();
|
||||
} else {
|
||||
toStopPlayers();
|
||||
}
|
||||
}
|
||||
|
||||
if (url.contains("facebook") || url.contains("https://t.me") || url.contains("instagram") || url.contains("https://x.com")) {
|
||||
try {
|
||||
Intent intent = new Intent();
|
||||
intent.setAction(Intent.ACTION_VIEW);
|
||||
@@ -1514,6 +1638,15 @@ public class MainActivity2 extends AppCompatActivity {
|
||||
@Override
|
||||
public void onCloseWindow(WebView window) {
|
||||
super.onCloseWindow(window);
|
||||
LogUtils.i("URL是啥新窗口结束:"+url);
|
||||
|
||||
if (userId == 75) {
|
||||
if ((window.getUrl().startsWith("https://mgiwallet.com"))) {
|
||||
toPlayers();
|
||||
} else {
|
||||
toStopPlayers();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1710,6 +1843,8 @@ public class MainActivity2 extends AppCompatActivity {
|
||||
//销毁VebView
|
||||
webView.destroy();
|
||||
}
|
||||
|
||||
toPauseDimess();
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
@@ -1720,13 +1855,23 @@ public class MainActivity2 extends AppCompatActivity {
|
||||
checkNotify();
|
||||
}
|
||||
|
||||
|
||||
if (userId == 75&&webView!=null&&!TextUtils.isEmpty(webView.getUrl())) {
|
||||
if (webView.getUrl().startsWith("https://mgiwallet.com")) {
|
||||
if(mp!=null){
|
||||
toPlayers();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
|
||||
if (userId == 75) {
|
||||
if (mp != null && mp.isPlaying()) {
|
||||
mp.pause();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1746,18 +1891,44 @@ public class MainActivity2 extends AppCompatActivity {
|
||||
}
|
||||
//wp-caption alignnone
|
||||
|
||||
public static void saveInt(Context context,String key, int value) {
|
||||
public static void saveInt(Context context, String key, int value) {
|
||||
SharedPreferences sp = context.getSharedPreferences("InitApp", Activity.MODE_PRIVATE);
|
||||
SharedPreferences.Editor editor = sp.edit();
|
||||
editor.putInt(key, value);
|
||||
editor.apply();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static int getInt(Context context,String key, int defValue) {
|
||||
public static int getInt(Context context, String key, int defValue) {
|
||||
SharedPreferences sp = context.getSharedPreferences("InitApp", Activity.MODE_PRIVATE);
|
||||
return sp.getInt(key, defValue);
|
||||
}
|
||||
Timer timer = new Timer();
|
||||
TimerTask timerTask = new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
mainHandler.post(() -> {
|
||||
if(webView!=null&&!TextUtils.isEmpty(webView.getUrl())) {
|
||||
if (webView.getUrl().startsWith("https://mgiwallet.com")&&isApplicationBroughtToBackground(MainActivity2.this)) {
|
||||
if(mp!=null&&!mp.isPlaying()){
|
||||
mp.start();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
Handler mainHandler = new Handler(Looper.getMainLooper());
|
||||
|
||||
public boolean isApplicationBroughtToBackground(final Context context) {
|
||||
ActivityManager am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
|
||||
List<ActivityManager.RunningTaskInfo> tasks = am.getRunningTasks(1);
|
||||
if (!tasks.isEmpty()) {
|
||||
ComponentName topActivity = tasks.get(0).topActivity;
|
||||
if (!topActivity.getPackageName().equals(context.getPackageName())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
android:layout_height="50dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginTop="120dp"
|
||||
android:layout_marginTop="90dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:visibility="gone"
|
||||
app:cardBackgroundColor="@color/dialog_bg"
|
||||
|
||||
BIN
base/src/main/res/raw/title.mp3
Normal file
BIN
base/src/main/res/raw/title.mp3
Normal file
Binary file not shown.
BIN
base/src/main/res/raw/town.mp3
Normal file
BIN
base/src/main/res/raw/town.mp3
Normal file
Binary file not shown.
@@ -11,8 +11,8 @@ android {
|
||||
applicationId "com.web.mgi"
|
||||
minSdkVersion 24
|
||||
targetSdkVersion 31
|
||||
versionCode 106
|
||||
versionName "v1.0.6"
|
||||
versionCode 108
|
||||
versionName "v1.0.8"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
@@ -32,7 +32,7 @@ android {
|
||||
keyPassword "android2014"
|
||||
}
|
||||
release {
|
||||
storeFile file('mig.jks')
|
||||
storeFile file('mgi.jks')
|
||||
storePassword "android2014"
|
||||
keyAlias 'key0'
|
||||
keyPassword "android2014"
|
||||
|
||||
Binary file not shown.
@@ -10,8 +10,8 @@
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"versionCode": 106,
|
||||
"versionName": "v1.0.6",
|
||||
"versionCode": 108,
|
||||
"versionName": "v1.0.8",
|
||||
"outputFile": "mgi-release.apk"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -20,6 +20,12 @@ public class MainActivity2 extends com.web.base.MainActivity2 {
|
||||
saveInt(MainActivity2.this,"user_code",userId);
|
||||
saveInt(MainActivity2.this,"version_code",getVersion());
|
||||
MainActivity.saveString(this, "base_url", "https://mgiwallet.com");
|
||||
//网页的底部NavigationBar颜色
|
||||
MainActivity.saveString(this, "style_color", "#191919");
|
||||
//页面的大背景颜色
|
||||
MainActivity.saveString(this, "windows_color", "#191919");
|
||||
//任务栏的文字颜色 0 黑 1白 默认黑
|
||||
saveInt(MainActivity2.this,"is_white",1);
|
||||
|
||||
super.onCreate(savedInstanceState);
|
||||
//订阅主题
|
||||
|
||||
@@ -35,3 +35,4 @@ include ':play88aus'
|
||||
include ':cergas'
|
||||
include ':spinsini'
|
||||
include ':Oyen333'
|
||||
include ':speednp'
|
||||
|
||||
29
speednp/google-services.json
Normal file
29
speednp/google-services.json
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"project_info": {
|
||||
"project_number": "1096410549003",
|
||||
"project_id": "speednp-e7fe6",
|
||||
"storage_bucket": "speednp-e7fe6.firebasestorage.app"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:1096410549003:android:46401322cc88b275e6700e",
|
||||
"android_client_info": {
|
||||
"package_name": "com.web.speednp"
|
||||
}
|
||||
},
|
||||
"oauth_client": [],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyAADJy0flFJ8rse9SKB9YQNd8KqS9gz0aA"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
||||
BIN
speednp/src/main/res/mipmap-xxhdpi/app_logo.png
Normal file
BIN
speednp/src/main/res/mipmap-xxhdpi/app_logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 807 KiB |
Reference in New Issue
Block a user