没有合适的资源?快使用搜索试试~ 我知道了~
首页Android实现微信自动抢红包的程序
Android实现微信自动抢红包的程序

简单实现了微信自动抢红包的服务,原理就是根据关键字找到相应的View, 然后自动点击,接下来通过本文给大家介绍Android实现微信自动抢红包的程序,对android微信自动抢红包相关知识感兴趣的朋友一起学习吧
资源详情
资源评论
资源推荐

Android实现微信自动抢红包的程序实现微信自动抢红包的程序
简单实现了微信自动抢红包的服务,原理就是根据关键字找到相应的View, 然后自动点击,接下来通过本文给大
家介绍Android实现微信自动抢红包的程序,对android微信自动抢红包相关知识感兴趣的朋友一起学习吧
简单实现了微信自动抢红包的服务,原理就是根据关键字找到相应的View, 然后自动点击。主要是用到AccessibilityService这
个辅助服务,基本可以满足自动抢红包的功能,但是有些逻辑需要优化,比如,拆完一个红包后,必须手动点击返回键,才能
进行下一次自动抢红包。
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.jackie.webchatenvelope" >
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service
android:enabled="true"
android:exported="true"
android:label="@string/app_name"
android:name=".EnvelopeService"
android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE">
<intent-filter>
<action android:name="android.accessibilityservice.AccessibilityService"/>
</intent-filter>
<meta-data
android:name="android.accessibilityservice"
android:resource="@xml/envelope_service_config"/>
</service>
</application>
</manifest>
envelope_service_config.xml
<?xml version="1.0" encoding="utf-8"?>
<accessibility-service xmlns:android="http://schemas.android.com/apk/res/android"
android:accessibilityEventTypes="typeNotificationStateChanged|typeWindowStateChanged"
android:accessibilityFeedbackType="feedbackGeneric"
android:accessibilityFlags=""
android:canRetrieveWindowContent="true"
android:description="@string/accessibility_description"
android:notificationTimeout="100"
android:packageNames="com.tencent.mm" />
activity_main.xml
<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=".MainActivity">
<Button
android:id="@+id/start"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp"
android:layout_centerInParent="true"
android:textSize="18sp"
android:text="打开辅助服务"/>
</RelativeLayout>
MainActivity.java


















安全验证
文档复制为VIP权益,开通VIP直接复制

评论1