Skip to content

Commit

Permalink
2.2.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
xbdcc committed Dec 31, 2019
1 parent 70445c1 commit babdc9e
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ https://github.com/xbdcc/CUtils
- 聊天列表页监控开关说明:若打开则在微信首页列表也发现红包消息则会跳转到详情页点击。
- 延迟时间说明:为防止秒抢拉仇恨也为防止微信封号加了延迟功能,延迟可以选择0-9秒。

最新版适配微信7.0.3,7.0.4,7.0.5版本,代码开源仅供学习使用,请勿用作商业用途。
最新版适配微信7.0.3,7.0.4,7.0.5,7.0.8,7.0.9版本,代码开源仅供学习使用,请勿用作商业用途。

## 打赏
<table>
Expand Down
8 changes: 3 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ android {
applicationId "com.carlos.grabredenvelope"
minSdkVersion 18
targetSdkVersion 28
versionCode 8
versionName "2.1.0"
flavorDimensions "8" //和versionCode相同
versionCode 9
versionName "2.2.0"
flavorDimensions "9" //和versionCode相同
ndk {
//选择要添加的对应 cpu 类型的 .so 库。
abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a', 'x86'
Expand Down Expand Up @@ -63,13 +63,11 @@ android {
//多渠道打包
productFlavors {
dev { //开发测试版本
buildConfigField("String", "BUGLY_KEY_DEV", "\"${defaultProperties['BUGLY_KEY_DEV']}\"")
buildConfigField("String", "UMENG_APPKEY_DEV", "\"${defaultProperties['UMENG_APPKEY_DEV']}\"")
buildConfigField("String", "SENTRY_DSN", "\"${defaultProperties['SENTRY_DSN_DEV']}\"")

}
production { //正式发布版本
buildConfigField("String", "BUGLY_KEY", "\"${defaultProperties['BUGLY_KEY']}\"")
buildConfigField("String", "UMENG_APPKEY", "\"${defaultProperties['UMENG_APPKEY']}\"")
buildConfigField("String", "SENTRY_DSN", "\"${defaultProperties['SENTRY_DSN']}\"")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,10 @@ class WechatService : AccessibilityService() {
private fun monitorChat() {
LogUtils.d("monitorChat")
if (!RedEnvelopePreferences.wechatControl.isMonitorChat) return
val lists = AccessibilityServiceUtils.getElementsById(RED_ENVELOPE_RECT_TITLE_ID, rootInActiveWindow) ?: return
val lists = AccessibilityServiceUtils.getElementsById(
RED_ENVELOPE_RECT_TITLE_ID,
rootInActiveWindow
) ?: return
for (envelope in lists) {
val redEnvelope = envelope.findAccessibilityNodeInfosByViewId(RED_ENVELOPE_TITLE_ID)
if (redEnvelope.isNotEmpty()) {
Expand All @@ -213,7 +216,8 @@ class WechatService : AccessibilityService() {
private fun grabRedEnvelope() {
LogUtils.d("grabRedEnvelope")

val envelopes = AccessibilityServiceUtils.getElementsById(RED_ENVELOPE_ID, rootInActiveWindow) ?: return
val envelopes =
AccessibilityServiceUtils.getElementsById(RED_ENVELOPE_ID, rootInActiveWindow) ?: return

/* 发现红包点击进入领取红包页面 */
for (envelope in envelopes.reversed()) {
Expand All @@ -236,7 +240,9 @@ class WechatService : AccessibilityService() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) return
if (event.className != WECHAT_LUCKYMONEY_ACTIVITY) return

var envelopes = AccessibilityServiceUtils.getElementsById(RED_ENVELOPE_OPEN_ID, rootInActiveWindow) ?: return
var envelopes =
AccessibilityServiceUtils.getElementsById(RED_ENVELOPE_OPEN_ID, rootInActiveWindow)
?: return
if (envelopes.isEmpty()) {
envelopes = rootInActiveWindow.findAccessibilityNodeInfosByViewId(RED_ENVELOPE_CLOSE_ID)
/* 进入红包页面点击退出按钮 */
Expand Down Expand Up @@ -301,6 +307,11 @@ class WechatService : AccessibilityService() {
path.moveTo(450f, 1250f)
420 -> //420一加5T
path.moveTo(540f, 1213f)
400 ->
path.moveTo(550f, 1200f) //华为mate9
else ->
path.moveTo(550f, 1200f)

}
val build = GestureDescription.Builder()
val gestureDescription =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class ControlUse(private val context: Context) {
message = "本软件设定使用时限已到时间,谢谢使用,请点击确定退出。如想继续用可联系小不点,谢谢!"
//设置使用期限2月25
// String stoptime="2016-03-30 00:00:00.000";//大于此时间的才可以使用
val stoptime = "2019-12-31 00:00:00.000"//小于此时间的才可以使用
val stoptime = "2020-12-31 00:00:00.000"//小于此时间的才可以使用
val dateFormat = SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
Log.i("停止使用时间", stoptime)
try {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<string name="grab_dingding_envelope">抢钉钉红包</string>

<string name="how_to_use">
为正常使用,建议APP权限和通知都打开。该版本适配微信7.0.3,7.0.4,7.0.5,其他版本下可能无效,最好在已适配的微信版本下使用。
为正常使用,建议APP权限和通知都打开。该版本适配微信7.0.3,7.0.4,7.0.5,7.0.8,7.0.9,其他版本下可能无效,最好在已适配的微信版本下使用。
\n\n使用说明:
\n辅助功能开启【抢微信红包】,若使用默认参数则通知或聊天列表页面或群聊发现有红包,则会自动点击红包并拆开跳转到详情页自动关闭。
\n通知监控开关说明:需要微信通知权限开启,此时若开启此功能收到通知有红包消息会自动跳转点击。
Expand Down

0 comments on commit babdc9e

Please sign in to comment.