Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fallenstardust
YGOMobile
Commits
b538dc43
Commit
b538dc43
authored
Dec 07, 2019
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
全局初始化bugly,支持上传native crash log
parent
f8008cbc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
26 deletions
+28
-26
mobile/assets/changelog.html
mobile/assets/changelog.html
+2
-6
mobile/src/main/java/cn/garymb/ygomobile/App.java
mobile/src/main/java/cn/garymb/ygomobile/App.java
+25
-0
mobile/src/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
...c/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
+1
-20
No files found.
mobile/assets/changelog.html
View file @
b538dc43
...
@@ -20,18 +20,14 @@
...
@@ -20,18 +20,14 @@
<pre>
<pre>
更新:
更新:
1.更新ygo内核;
1.更新ygo内核;
2.新卡LVP3+VJ+YMAB;
3.更换自动更新下载源;
修复:
修复:
1.安卓10不能正确获得更新的问题;
1.修复部分华为刘海屏手机点击偏移的问题;
2.安卓10的权限适配问题;
</pre>
</pre>
<h3
style=
"color:#ff0000"
>
注意
</h3>
<h3
style=
"color:#ff0000"
>
注意
</h3>
<pre>
<pre>
出现点击不准,不灵敏的情况
出现点击不准,不灵敏的情况
·华为手机进手机设置,隐藏顶部区域(不同华为有不同的叫法,都是隐藏状态栏)
·小米手机MIUI11选择功能菜单>设置>开启沉浸式画面
·小米手机MIUI11选择功能菜单>设置>开启沉浸式画面
目前手头缺少
这两品牌的
多种机型,适配坑深难以一步到位
目前手头缺少多种机型,适配坑深难以一步到位
还请海涵。
还请海涵。
</pre>
</pre>
</body>
</body>
...
...
mobile/src/main/java/cn/garymb/ygomobile/App.java
View file @
b538dc43
...
@@ -4,14 +4,19 @@ package cn.garymb.ygomobile;
...
@@ -4,14 +4,19 @@ package cn.garymb.ygomobile;
import
android.app.Activity
;
import
android.app.Activity
;
import
android.content.Context
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.content.pm.ApplicationInfo
;
import
android.content.pm.PackageManager
;
import
android.widget.ImageView
;
import
android.widget.ImageView
;
import
androidx.appcompat.app.AppCompatDelegate
;
import
androidx.appcompat.app.AppCompatDelegate
;
import
com.bumptech.glide.Glide
;
import
com.bumptech.glide.Glide
;
import
com.tencent.bugly.Bugly
;
import
com.tencent.bugly.beta.Beta
;
import
com.yuyh.library.imgsel.ISNav
;
import
com.yuyh.library.imgsel.ISNav
;
import
com.yuyh.library.imgsel.common.ImageLoader
;
import
com.yuyh.library.imgsel.common.ImageLoader
;
import
cn.garymb.ygomobile.lite.R
;
import
cn.garymb.ygomobile.utils.CrashHandler
;
import
cn.garymb.ygomobile.utils.CrashHandler
;
public
class
App
extends
GameApplication
{
public
class
App
extends
GameApplication
{
...
@@ -30,6 +35,8 @@ public class App extends GameApplication {
...
@@ -30,6 +35,8 @@ public class App extends GameApplication {
}
}
//初始化图片选择器
//初始化图片选择器
initImgsel
();
initImgsel
();
//初始化bugly
initBugly
();
}
}
@Override
@Override
...
@@ -140,4 +147,22 @@ public class App extends GameApplication {
...
@@ -140,4 +147,22 @@ public class App extends GameApplication {
}
}
});
});
}
}
public
void
initBugly
()
{
Beta
.
initDelay
=
0
;
Beta
.
showInterruptedStrategy
=
true
;
Beta
.
largeIconId
=
R
.
drawable
.
ic_icon_round
;
Beta
.
defaultBannerId
=
R
.
drawable
.
ic_icon_round
;
Beta
.
strToastYourAreTheLatestVersion
=
this
.
getString
(
R
.
string
.
Already_Lastest
);
Beta
.
strToastCheckingUpgrade
=
this
.
getString
(
R
.
string
.
Checking_Update
);
Beta
.
upgradeDialogLayoutId
=
R
.
layout
.
dialog_upgrade
;
ApplicationInfo
appInfo
=
null
;
try
{
appInfo
=
this
.
getPackageManager
().
getApplicationInfo
(
getPackageName
(),
PackageManager
.
GET_META_DATA
);
}
catch
(
PackageManager
.
NameNotFoundException
e
)
{
e
.
printStackTrace
();
}
String
msg
=
appInfo
.
metaData
.
getString
(
"BUGLY_APPID"
);
Bugly
.
init
(
this
,
msg
,
true
);
}
}
}
mobile/src/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
View file @
b538dc43
...
@@ -34,6 +34,7 @@ import com.nightonke.boommenu.BoomButtons.TextOutsideCircleButton;
...
@@ -34,6 +34,7 @@ import com.nightonke.boommenu.BoomButtons.TextOutsideCircleButton;
import
com.nightonke.boommenu.BoomMenuButton
;
import
com.nightonke.boommenu.BoomMenuButton
;
import
com.tencent.bugly.Bugly
;
import
com.tencent.bugly.Bugly
;
import
com.tencent.bugly.beta.Beta
;
import
com.tencent.bugly.beta.Beta
;
import
com.tencent.bugly.crashreport.CrashReport
;
import
com.tencent.smtt.sdk.QbSdk
;
import
com.tencent.smtt.sdk.QbSdk
;
import
com.tubb.smrv.SwipeMenuRecyclerView
;
import
com.tubb.smrv.SwipeMenuRecyclerView
;
...
@@ -123,8 +124,6 @@ public abstract class HomeActivity extends BaseActivity implements NavigationVie
...
@@ -123,8 +124,6 @@ public abstract class HomeActivity extends BaseActivity implements NavigationVie
QbSdk
.
initX5Environment
(
this
,
cb
);
QbSdk
.
initX5Environment
(
this
,
cb
);
//trpay
//trpay
TrPay
.
getInstance
(
HomeActivity
.
this
).
initPaySdk
(
"e1014da420ea4405898c01273d6731b6"
,
"YGOMobile"
);
TrPay
.
getInstance
(
HomeActivity
.
this
).
initPaySdk
(
"e1014da420ea4405898c01273d6731b6"
,
"YGOMobile"
);
//初始化bugly
initBugly
();
//check update
//check update
Beta
.
checkUpgrade
(
false
,
false
);
Beta
.
checkUpgrade
(
false
,
false
);
//ServiceDuelAssistant
//ServiceDuelAssistant
...
@@ -493,24 +492,6 @@ public abstract class HomeActivity extends BaseActivity implements NavigationVie
...
@@ -493,24 +492,6 @@ public abstract class HomeActivity extends BaseActivity implements NavigationVie
}
}
}
}
public
void
initBugly
()
{
Beta
.
initDelay
=
0
;
Beta
.
showInterruptedStrategy
=
true
;
Beta
.
largeIconId
=
R
.
drawable
.
ic_icon_round
;
Beta
.
defaultBannerId
=
R
.
drawable
.
ic_icon_round
;
Beta
.
strToastYourAreTheLatestVersion
=
this
.
getString
(
R
.
string
.
Already_Lastest
);
Beta
.
strToastCheckingUpgrade
=
this
.
getString
(
R
.
string
.
Checking_Update
);
Beta
.
upgradeDialogLayoutId
=
R
.
layout
.
dialog_upgrade
;
ApplicationInfo
appInfo
=
null
;
try
{
appInfo
=
this
.
getPackageManager
().
getApplicationInfo
(
getPackageName
(),
PackageManager
.
GET_META_DATA
);
}
catch
(
PackageManager
.
NameNotFoundException
e
)
{
e
.
printStackTrace
();
}
String
msg
=
appInfo
.
metaData
.
getString
(
"BUGLY_APPID"
);
Bugly
.
init
(
this
,
msg
,
true
);
}
public
boolean
joinQQGroup
(
String
key
)
{
public
boolean
joinQQGroup
(
String
key
)
{
Intent
intent
=
new
Intent
();
Intent
intent
=
new
Intent
();
intent
.
setData
(
Uri
.
parse
(
"mqqopensdkapi://bizAgent/qm/qr?url=http%3A%2F%2Fqm.qq.com%2Fcgi-bin%2Fqm%2Fqr%3Ffrom%3Dapp%26p%3Dandroid%26k%3D"
+
key
));
intent
.
setData
(
Uri
.
parse
(
"mqqopensdkapi://bizAgent/qm/qr?url=http%3A%2F%2Fqm.qq.com%2Fcgi-bin%2Fqm%2Fqr%3Ffrom%3Dapp%26p%3Dandroid%26k%3D"
+
key
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment