Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_goodmoney
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_goodmoney
Commits
729994a5
Commit
729994a5
authored
Jul 10, 2021
by
mengcuiguang2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加支付宝任务 1.3.6发版
parent
bd678a3d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
55 additions
and
5 deletions
+55
-5
build.gradle
GoodMoney/app/build.gradle
+2
-2
MyInfo.java
...p/src/main/java/com/mints/goodmoney/mvp/model/MyInfo.java
+10
-0
MainMyAdapter.kt
...main/java/com/mints/goodmoney/ui/adapter/MainMyAdapter.kt
+2
-0
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+19
-0
AppUtil.kt
...ey/app/src/main/java/com/mints/goodmoney/utils/AppUtil.kt
+22
-3
No files found.
GoodMoney/app/build.gradle
View file @
729994a5
...
@@ -15,8 +15,8 @@ android {
...
@@ -15,8 +15,8 @@ android {
applicationId
"com.mints.goodmoney"
applicationId
"com.mints.goodmoney"
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
versionCode
3
5
versionCode
3
6
versionName
"1.3.
5
"
versionName
"1.3.
6
"
flavorDimensions
"default"
flavorDimensions
"default"
// dex突破65535的限制
// dex突破65535的限制
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/model/MyInfo.java
View file @
729994a5
...
@@ -200,6 +200,8 @@ public class MyInfo implements Serializable {
...
@@ -200,6 +200,8 @@ public class MyInfo implements Serializable {
private
String
carrierType
;
private
String
carrierType
;
private
String
downloadUrl
;
private
String
downloadUrl
;
private
String
pkg
;
private
String
pkg
;
private
String
pkgName
;
private
String
toUrl
;
private
String
key
;
private
String
key
;
private
String
doubleCarrierType
;
private
String
doubleCarrierType
;
private
int
complete
;
private
int
complete
;
...
@@ -208,6 +210,14 @@ public class MyInfo implements Serializable {
...
@@ -208,6 +210,14 @@ public class MyInfo implements Serializable {
private
int
readCoin
;
private
int
readCoin
;
private
int
needSeconds
;
private
int
needSeconds
;
public
String
getPkgName
()
{
return
pkgName
;
}
public
String
getTourl
()
{
return
toUrl
;
}
public
String
getDownloadUrl
()
{
public
String
getDownloadUrl
()
{
return
downloadUrl
;
return
downloadUrl
;
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/adapter/MainMyAdapter.kt
View file @
729994a5
...
@@ -65,6 +65,8 @@ class MainMyAdapter(context: Context, taskData: MutableList<MyInfo.AutoListBean>
...
@@ -65,6 +65,8 @@ class MainMyAdapter(context: Context, taskData: MutableList<MyInfo.AutoListBean>
const
val
TO_MOKU
=
"TO_MOKU"
const
val
TO_MOKU
=
"TO_MOKU"
//愉悦赚
//愉悦赚
const
val
TO_YYZ
=
"TO_YYZ"
const
val
TO_YYZ
=
"TO_YYZ"
// 三方积分墙
const
val
TO_OTHERAPP
=
"TO_OTHERAPP"
}
}
private
var
mContext
:
Context
=
context
private
var
mContext
:
Context
=
context
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
729994a5
...
@@ -4,6 +4,7 @@ import android.Manifest
...
@@ -4,6 +4,7 @@ import android.Manifest
import
android.annotation.SuppressLint
import
android.annotation.SuppressLint
import
android.app.Dialog
import
android.app.Dialog
import
android.content.*
import
android.content.*
import
android.net.Uri
import
android.os.Bundle
import
android.os.Bundle
import
android.text.TextUtils
import
android.text.TextUtils
import
android.view.LayoutInflater
import
android.view.LayoutInflater
...
@@ -605,6 +606,24 @@ class MyFragment : BaseFragment(),
...
@@ -605,6 +606,24 @@ class MyFragment : BaseFragment(),
R
.
id
.
item_task_click
->
{
R
.
id
.
item_task_click
->
{
val
taskBean
=
dataList
[
position
]
val
taskBean
=
dataList
[
position
]
when
(
taskBean
.
baseConfig
.
taskId
)
{
when
(
taskBean
.
baseConfig
.
taskId
)
{
// 积分任务
MainMyAdapter
.
TO_OTHERAPP
->
{
if
(!
TextUtils
.
isEmpty
(
taskBean
.
otherConfig
.
pkg
)
&&
!
AppUtil
.
checkPackInfo
(
requireActivity
(),
taskBean
.
otherConfig
.
pkg
))
{
showToast
(
"请先安装"
+
taskBean
.
otherConfig
.
pkgName
)
return
}
if
(!
TextUtils
.
isEmpty
(
taskBean
.
otherConfig
.
tourl
)){
try
{
val
uri
=
Uri
.
parse
(
taskBean
.
otherConfig
.
tourl
)
val
intent
=
Intent
(
Intent
.
ACTION_VIEW
,
uri
)
startActivity
(
intent
)
}
catch
(
e
:
Exception
){
AppUtil
.
openBrowser
(
requireContext
(),
taskBean
.
otherConfig
.
tourl
)
}
}
}
// 跳转珊瑚CPD下载试玩任务
// 跳转珊瑚CPD下载试玩任务
MainMyAdapter
.
TO_CPD
->
{
MainMyAdapter
.
TO_CPD
->
{
if
(!
UserManager
.
getInstance
().
userIsLogin
())
{
if
(!
UserManager
.
getInstance
().
userIsLogin
())
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/utils/AppUtil.kt
View file @
729994a5
...
@@ -9,13 +9,11 @@ import android.content.Context
...
@@ -9,13 +9,11 @@ import android.content.Context
import
android.content.Intent
import
android.content.Intent
import
android.content.pm.PackageInfo
import
android.content.pm.PackageInfo
import
android.content.pm.PackageManager
import
android.content.pm.PackageManager
import
android.net.Uri
import
android.os.Build
import
android.os.Build
import
android.provider.Settings
import
android.provider.Settings
import
com.fly.scenemodule.util.StringUtilMy
import
com.fly.scenemodule.util.StringUtilMy
import
com.mints.goodmoney.BuildConfig
import
com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.MintsApplication
import
java.text.SimpleDateFormat
import
java.util.*
/**
/**
...
@@ -162,5 +160,26 @@ object AppUtil {
...
@@ -162,5 +160,26 @@ object AppUtil {
return
false
return
false
}
}
/**
* 跳转外部浏览器
*/
fun
openBrowser
(
context
:
Context
,
url
:
String
?)
{
try
{
val
intent
=
Intent
()
intent
.
action
=
Intent
.
ACTION_VIEW
intent
.
data
=
Uri
.
parse
(
url
)
// 注意此处的判断intent.resolveActivity()可以返回显示该Intent的Activity对应的组件名
// 官方解释 : Name of the component implementing an activity that can display the intent
if
(
intent
.
resolveActivity
(
context
.
packageManager
)
!=
null
)
{
val
componentName
=
intent
.
resolveActivity
(
context
.
packageManager
)
LogUtil
.
d
(
"suyan = "
+
componentName
.
className
)
context
.
startActivity
(
Intent
.
createChooser
(
intent
,
"请选择浏览器"
))
}
else
{
ToastUtil
.
show
(
context
,
"链接错误或无浏览器"
)
}
}
catch
(
e
:
Exception
){
e
.
printStackTrace
()
}
}
}
}
\ No newline at end of file
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