Skip to content

Commit f23bc98

Browse files
committed
Update code.
1 parent 8c03f2a commit f23bc98

File tree

11 files changed

+25
-22
lines changed

11 files changed

+25
-22
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
/xbd
1313
/app/src/production
1414
app/src/main/java/com/carlos/grabredenvelope/local
15-
/hotfix
15+
/apk

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# GrabRedEnvelope
22
[![Gitter](https://badges.gitter.im/xbdcc/GrabRedEnvelope.svg)](https://gitter.im/xbdcc/GrabRedEnvelope?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
3-
[![api](https://img.shields.io/badge/API-19+-brightgreen.svg)](https://android-arsenal.com/api?level=19)
3+
[![api](https://img.shields.io/badge/API-18+-brightgreen.svg)](https://android-arsenal.com/api?level=19)
44
[![Build Status](https://travis-ci.org/xbdcc/GrabRedEnvelope.svg?branch=master)](https://travis-ci.org/xbdcc/GrabRedEnvelope)
55

6-
## 最新版本下载地址
7-
http://xbdcc.cn/GrabRedEnvelope/download.html
6+
## APP下载地址及说明
7+
http://xbdcc.cn/GrabRedEnvelope/index.html
88

99
## 实现过程介绍:
10-
https://github.com/xbdcc/GrabRedEnvelope/blob/master/demo/README.md
10+
https://www.jianshu.com/p/e1099a94b979
1111

1212
## Gif图片
1313
![gif1](https://github.com/xbdcc/GrabRedEnvelope/blob/master/records/record1.gif)
@@ -35,6 +35,8 @@ https://github.com/xbdcc/GrabRedEnvelope/blob/master/demo/README.md
3535
</table>
3636

3737
## 版本说明
38+
### v2.1.0(2019.07.21)
39+
适配微信7.0.4,7.0.5,修复bug。
3840
### v2.0.1(2019.03.04)
3941
修复bug。
4042
### v2.0.0(2019.02.24)

app/src/main/java/com/carlos/grabredenvelope/activity/MainActivity.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import com.carlos.grabredenvelope.old2016.ToastUtils
1818
import com.carlos.grabredenvelope.old2016.Update
1919
import com.carlos.grabredenvelope.old2016.Utility
2020
import com.carlos.grabredenvelope.util.ControlUse
21-
import com.tencent.bugly.beta.Beta
2221

2322
/**
2423
* _ooOoo_
@@ -115,10 +114,10 @@ open class MainActivity : BaseActivity() {
115114

116115
}
117116
3 -> {
118-
// val update = Update(this, 2)
119-
// update.update()
117+
val update = Update(this, 2)
118+
update.update()
120119

121-
Beta.autoCheckUpgrade = true
120+
// Beta.autoCheckUpgrade = true
122121
}
123122

124123
4 -> {

app/src/main/java/com/carlos/grabredenvelope/activity/WechatEnvelopeActivity.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class WechatEnvelopeActivity : BaseActivity(), SeekBar.OnSeekBarChangeListener {
127127
mSbWechatPutong.progress = t_putong
128128

129129
t_lingqu = wechatControlVO.delayCloseTime
130-
mSbWechatLingqu.progress = t_lingqu
130+
mSbWechatLingqu.progress = t_lingqu - 1
131131
if (t_lingqu == 11) {
132132
mTvWechatLingqu.text = "红包领取页关闭时间:" + "不关闭"
133133
} else {
@@ -161,7 +161,7 @@ class WechatEnvelopeActivity : BaseActivity(), SeekBar.OnSeekBarChangeListener {
161161

162162
R.id.sb_qq_lingqu -> {
163163
LogUtils.d("sb_qq_lingqu:$progress")
164-
t_lingqu = progress
164+
t_lingqu = progress + 1
165165
mTvWechatLingqu.text = "红包领取页关闭延迟时间:" + t_lingqu + "s"
166166
if (t_lingqu == 11) {
167167
mTvWechatLingqu.text = "红包领取页关闭时间:" + "不关闭"

app/src/main/java/com/carlos/grabredenvelope/dao/WechatControlVO.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,5 @@ data class WechatControlVO(
4545
@Transient
4646
var delayOpenTime: Int = 0,
4747
@Transient
48-
var delayCloseTime: Int = 0
48+
var delayCloseTime: Int = 1
4949
)

app/src/main/java/com/carlos/grabredenvelope/old2016/Update.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ class Update(private val context: Context, private val type: Int) {
117117
position = i
118118
}
119119
}
120+
LogUtils.d("temp:" + temp)
121+
LogUtils.d("versionCode:" + versionCode)
120122
if (temp > versionCode) {
121123
Log.i(TAG, "有新的的版本" + infos[position].versionName)
122124
newVersion = true

app/src/main/java/com/carlos/grabredenvelope/services/WechatService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ import kotlinx.coroutines.launch
7070

7171
/**
7272
* Created by Carlos on 2019/2/14.
73-
* Test in Wechat 7.0.3
73+
* Adapt Wechat 7.0.3,7.0.4,7.0.5.
7474
*/
7575
class WechatService : AccessibilityService() {
7676

app/src/main/res/layout/activity_wechat_envelope.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
android:layout_width="match_parent"
144144
android:layout_height="wrap_content"
145145
android:id="@+id/sb_qq_lingqu"
146-
android:max="11"
146+
android:max="10"
147147
android:layout_marginTop="10dp" />
148148
</LinearLayout>
149149

app/tinker-support.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ def bakPath = file("${buildDir}/bakApk/")
55
/**
66
* 此处填写每次构建生成的基准包目录
77
*/
8-
def baseApkDir = "app-0624-15-31-01"
8+
def baseApkDir = "app-0721-15-40-13"
99

1010
/**
1111
* 对于插件各参数的详细解析请参考
@@ -25,19 +25,19 @@ tinkerSupport {
2525
// 编译补丁包时,必需指定基线版本的apk,默认值为空
2626
// 如果为空,则表示不是进行补丁包的编译
2727
// @{link tinkerPatch.oldApk }
28-
baseApk = "${bakPath}/${baseApkDir}/app-debug.apk"
28+
baseApk = "${bakPath}/${baseApkDir}/GrabRedEnvelope2.1.0.apk"
2929

3030
// 对应tinker插件applyMapping
31-
baseApkProguardMapping = "${bakPath}/${baseApkDir}/app-debug-mapping.txt"
31+
baseApkProguardMapping = "${bakPath}/${baseApkDir}/app-production-release-mapping.txt"
3232

3333
// 对应tinker插件applyResourceMapping
34-
baseApkResourceMapping = "${bakPath}/${baseApkDir}/app-debug-R.txt"
34+
baseApkResourceMapping = "${bakPath}/${baseApkDir}/app-production-release-R.txt"
3535

3636
// 构建基准包和补丁包都要指定不同的tinkerId,并且必须保证唯一性
37-
tinkerId = "base-2.1.0"
37+
tinkerId = "patch-2.1.0"
3838

3939
// 构建多渠道补丁时使用
40-
// buildAllFlavorsDir = "${bakPath}/${baseApkDir}"
40+
buildAllFlavorsDir = "${bakPath}/${baseApkDir}"
4141

4242
// 是否启用加固模式,默认为false.(tinker-spport 1.0.7起支持)
4343
// isProtectedApp = true

0 commit comments

Comments
 (0)