Skip to content

Commit

Permalink
Update code.
Browse files Browse the repository at this point in the history
  • Loading branch information
xbdcc committed Jul 21, 2019
1 parent 8c03f2a commit f23bc98
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
/xbd
/app/src/production
app/src/main/java/com/carlos/grabredenvelope/local
/hotfix
/apk
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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

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

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

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

## 版本说明
### v2.1.0(2019.07.21)
适配微信7.0.4,7.0.5,修复bug。
### v2.0.1(2019.03.04)
修复bug。
### v2.0.0(2019.02.24)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import com.carlos.grabredenvelope.old2016.ToastUtils
import com.carlos.grabredenvelope.old2016.Update
import com.carlos.grabredenvelope.old2016.Utility
import com.carlos.grabredenvelope.util.ControlUse
import com.tencent.bugly.beta.Beta

/**
* _ooOoo_
Expand Down Expand Up @@ -115,10 +114,10 @@ open class MainActivity : BaseActivity() {

}
3 -> {
// val update = Update(this, 2)
// update.update()
val update = Update(this, 2)
update.update()

Beta.autoCheckUpgrade = true
// Beta.autoCheckUpgrade = true
}

4 -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class WechatEnvelopeActivity : BaseActivity(), SeekBar.OnSeekBarChangeListener {
mSbWechatPutong.progress = t_putong

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

R.id.sb_qq_lingqu -> {
LogUtils.d("sb_qq_lingqu:$progress")
t_lingqu = progress
t_lingqu = progress + 1
mTvWechatLingqu.text = "红包领取页关闭延迟时间:" + t_lingqu + "s"
if (t_lingqu == 11) {
mTvWechatLingqu.text = "红包领取页关闭时间:" + "不关闭"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ data class WechatControlVO(
@Transient
var delayOpenTime: Int = 0,
@Transient
var delayCloseTime: Int = 0
var delayCloseTime: Int = 1
)
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ class Update(private val context: Context, private val type: Int) {
position = i
}
}
LogUtils.d("temp:" + temp)
LogUtils.d("versionCode:" + versionCode)
if (temp > versionCode) {
Log.i(TAG, "有新的的版本" + infos[position].versionName)
newVersion = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ import kotlinx.coroutines.launch

/**
* Created by Carlos on 2019/2/14.
* Test in Wechat 7.0.3
* Adapt Wechat 7.0.3,7.0.4,7.0.5.
*/
class WechatService : AccessibilityService() {

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_wechat_envelope.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/sb_qq_lingqu"
android:max="11"
android:max="10"
android:layout_marginTop="10dp" />
</LinearLayout>

Expand Down
12 changes: 6 additions & 6 deletions app/tinker-support.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def bakPath = file("${buildDir}/bakApk/")
/**
* 此处填写每次构建生成的基准包目录
*/
def baseApkDir = "app-0624-15-31-01"
def baseApkDir = "app-0721-15-40-13"

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

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

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

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

// 构建多渠道补丁时使用
// buildAllFlavorsDir = "${bakPath}/${baseApkDir}"
buildAllFlavorsDir = "${bakPath}/${baseApkDir}"

// 是否启用加固模式,默认为false.(tinker-spport 1.0.7起支持)
// isProtectedApp = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import com.carlos.grabredenvelope.demo.WechatConstants.RED_ENVELOPE_OPEN_ID

/**
* Created by Carlos on 2019/2/25.
* 基于Android版微信7.0.3测试.
* Adapt Wechat 7.0.3,7.0.4,7.0.5.
*/
class WechatService : AccessibilityService() {

Expand Down

0 comments on commit f23bc98

Please sign in to comment.