Skip to content

Commit

Permalink
add apk file
Browse files Browse the repository at this point in the history
add notification detect
add settings
mod optimize structure
add README file
  • Loading branch information
unknown authored and unknown committed Feb 13, 2015
1 parent 2c2fdc0 commit 9461280
Show file tree
Hide file tree
Showing 24 changed files with 556 additions and 64 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -24,3 +24,5 @@ proguard/

# Log Files
*.log

!/APK/*
Binary file added APK/RedEnvelopeAssistant_150213.apk
Binary file not shown.
55 changes: 55 additions & 0 deletions README.md
@@ -1,2 +1,57 @@
# RedEnvelopeAssistant
RedEnvelopeAssistant
Below is a chinese instruction:

---
#红包助手
---
完全免费开源的抢红包软件
##功能
此软件是为了辅助抢红包而开发
支持支付宝以及微信,目前只有Android版本,暂时不考虑开发其他版本
由于只是业余2-3天时间做的,可能有不少功能问题
需要的同学可以执行扩展功能
春节期间不再维护,等春节过后

###支付宝红包助手
支持所有Android版本以及几乎所有机型
可以在未抢到红包的情形下再抢一次或者多抢几次红包
目前可以稳定使用
###微信红包助手
可以在聊天页面自动抢红包
目前仅支持Andorid4.4系统,4.0以下完全无法使用,[4.0-4.4)以及(4.4,]部分功能可以使用(视手机而定)
还有遗留问题,需要后续完善。

##使用
###支付宝红包助手
由于支付宝的数据是保存在本地,如果某一次没有抢到红包,可以把数据清除,重新登录,然后再抢一次,当然在服务端红包应该是有上线限制的,但是如果第一次没有抢到,可以利用这个再抢一次。
另外一种方式就是改系统时间,此应用没有实现
###微信红包助手
按照提示开启红包服务
进入设置页面,勾选微信聊天页面自动抢红包(默认关闭)
打开微信,进入聊天页面

注意(设置->微信聊天页面自动抢红包)
以上功能存在bug,不建议开启 如果微信在后台运行,希望在点击通知栏红包提醒后进入聊天页面时自动抢红包,可开启,抢到后,请关闭此功能;后台运行时才打开此功能

##已知问题
###微信红包助手
1. 对Android版本有限制,4.4功能全一些
2. 自动抢红包可能会重复抢一个红包
3. 抢红包过程中页面跳转会有问题
4. 抢到红包后需要关闭服务才能查看红包额度


##技术实现
###支付宝
1. 直接跳转到应用清除页面
2. root权限使用"am clear XXXX"命令清除应用数据
###微信
使用AccessibilityService对程序进行模拟点击
目前如何去判断这个页面中某一个红包已经抢过是关键问题,暂时还没有解决

##优化
1. 代码结构优化
2. UI权限以及包监听优化
3.

12 changes: 9 additions & 3 deletions RedEnvelopeAssistant/AndroidManifest.xml
Expand Up @@ -2,20 +2,20 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.nearucenterplaza.redenvelopeassistant"
android:versionCode="1"
android:versionName="1.0" >
android:versionName="0.0.1 dev" >

<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />

<application
android:name="com.nearucenterplaza.redenvelopeassistant.fragment.RedEnvelopeApplication"
android:name="com.nearucenterplaza.redenvelopeassistant.ui.RedEnvelopeApplication"
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.nearucenterplaza.redenvelopeassistant.HomeActivity"
android:name="com.nearucenterplaza.redenvelopeassistant.ui.activity.HomeActivity"
android:label="@string/app_name"
android:launchMode="singleInstance"
android:screenOrientation="portrait" >
Expand All @@ -25,6 +25,12 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<activity
android:name="com.nearucenterplaza.redenvelopeassistant.ui.activity.SettingActivity"
android:screenOrientation="portrait">

</activity>

<service
android:name="com.nearucenterplaza.redenvelopeassistant.service.WechatAccService"
Expand Down
4 changes: 2 additions & 2 deletions RedEnvelopeAssistant/res/layout/activity_home.xml
Expand Up @@ -4,7 +4,7 @@
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.nearucenterplaza.redenvelopeassistant.HomeActivity" >
tools:context="com.nearucenterplaza.redenvelopeassistant.ui.activity.HomeActivity" >

<!--
As the main content view, the view below consumes the entire
Expand All @@ -30,7 +30,7 @@

<fragment
android:id="@+id/navigation_drawer"
android:name="com.nearucenterplaza.redenvelopeassistant.NavigationDrawerFragment"
android:name="com.nearucenterplaza.redenvelopeassistant.ui.fragmant.NavigationDrawerFragment"
android:layout_width="@dimen/navigation_drawer_width"
android:layout_height="match_parent"
android:layout_gravity="start"
Expand Down
56 changes: 56 additions & 0 deletions RedEnvelopeAssistant/res/layout/activity_settings.xml
@@ -0,0 +1,56 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.updsssggg.redenvelopeassistant.HomeActivity$PlaceholderFragment" >

<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >

<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="right|center_vertical"
android:text="红包助手"
android:textSize="16sp" />

<CheckBox
android:id="@+id/settings_auto_click_on_chat_cb"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="微信聊天页面自动抢红包" />

<TextView
android:id="@+id/alipay_root_state_tv"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="以上功能存在bug,不建议开启\n如果微信在后台运行,希望在点击通知栏红包提醒后进入聊天页面时自动抢红包,可开启,抢到后,请关闭此功能;后台运行时才打开此功能"
android:textSize="15sp" />

<CheckBox
android:id="@+id/settings_auto_back_when_get_lucky_money_cb"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="抢红包后自动返回上一页" />

<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="以上功能存在bug,可能会导致退出微信页面,需要手动再进入,但推荐使用,加快抢红包速度"
android:textSize="15sp" />
</LinearLayout>

<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="vertical" >
</LinearLayout>

</RelativeLayout>
15 changes: 13 additions & 2 deletions RedEnvelopeAssistant/res/layout/fragment_about.xml
Expand Up @@ -25,7 +25,7 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/alipay_gap"
android:text="1.支付宝红包 (每次抢到红包后,使用本软件清除应用数据后,再登录支付宝即可继续抢红包)\n2.微信红包(请打开要抢红包的群页面,应用会自动无人值守抢红包,请保持屏幕常亮)"
android:text="此应用完全免费\n1.支付宝红包 (每次抢到红包后,使用本软件清除应用数据后,再登录支付宝即可继续抢红包)\n2.微信红包(请打开要抢红包的群页面,应用会自动无人值守抢红包,请保持屏幕常亮)"
android:textColor="@android:color/black"
android:textSize="15sp" />
</LinearLayout>
Expand All @@ -36,6 +36,14 @@
android:layout_alignParentBottom="true"
android:orientation="vertical" >

<TextView
android:id="@+id/about_version_tv"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/alipay_gap"
android:gravity="center"
android:text="版本:1.0.0" />

<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
Expand All @@ -44,11 +52,14 @@
android:text="使用本软件带来的任何风险问题,本人以及团队不负任何责任" />

<TextView
android:id="@+id/about_go_github_tv"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/alipay_gap"
android:background="@drawable/btn_green_selector"
android:gravity="center"
android:text="By RxRead" />
android:text="By RxRead"
android:textColor="@android:color/white" />
</LinearLayout>

</RelativeLayout>
Expand Up @@ -6,5 +6,5 @@
android:choiceMode="singleChoice"
android:divider="@android:color/transparent"
android:dividerHeight="0dp"
tools:context="com.nearucenterplaza.redenvelopeassistant.NavigationDrawerFragment" />
tools:context="com.nearucenterplaza.redenvelopeassistant.ui.fragmant.NavigationDrawerFragment" />

11 changes: 10 additions & 1 deletion RedEnvelopeAssistant/res/layout/fragment_wechat.xml
Expand Up @@ -34,7 +34,16 @@
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="vertical" >

<TextView
android:id="@+id/wechat_setting_tv"
android:layout_width="fill_parent"
android:layout_height="35dp"
android:layout_marginTop="@dimen/wechat_gap"
android:background="@drawable/btn_green_selector"
android:gravity="center"
android:text="设置"
android:textColor="@android:color/white" />

<TextView
android:id="@+id/wechat_openapp_tv"
android:layout_width="fill_parent"
Expand Down
2 changes: 1 addition & 1 deletion RedEnvelopeAssistant/res/xml/accessibility.xml
Expand Up @@ -7,5 +7,5 @@
android:canRequestTouchExplorationMode="true"
android:canRetrieveWindowContent="true"
android:notificationTimeout="10"
android:settingsActivity="com.nearucenterplaza.redenvelopeassistant.HomeActivity" />
android:settingsActivity="com.nearucenterplaza.redenvelopeassistant.ui.activity.HomeActivity" />
<!-- typeAllMask typeViewClicked typeViewFocused -->

0 comments on commit 9461280

Please sign in to comment.