安卓自动点击软件有哪些
时间: 2023-06-12 18:02:35 浏览: 54
以下是一些常见的安卓自动点击软件:
1. Auto Clicker - Automatic tap
2. Automatic Clicker
3. Click Assistant - Auto Clicker : Gesture Recorder
4. Easy Touch - Auto Clicker
5. RepetiTouch Pro (root)
6. GS Auto Clicker
7. AutomateIt
8. MacroDroid - Device Automation
需要注意的是,自动点击软件可能会被一些游戏或应用视为作弊行为,使用时需谨慎。
相关问题
安卓编写一个录制手势自动点击的软件
要实现录制手势自动点击的软件,可以使用Android提供的GestureDetector类来实现手势的录制和识别,使用Handler类来实现自动点击。下面是一个简单的示例代码:
1. 首先在布局文件中添加一个ImageView和一个Button:
```
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitXY" />
<Button
android:id="@+id/btn_start"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Start"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="16dp" />
</RelativeLayout>
```
2. 在Activity中添加以下代码:
```
public class MainActivity extends AppCompatActivity implements GestureDetector.OnGestureListener {
private GestureDetector gestureDetector;
private ImageView imageView;
private Button btnStart;
private List<GesturePoint> gesturePoints = new ArrayList<>();
private boolean isRecording = false;
private boolean isPlaying = false;
private Handler handler = new Handler();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
gestureDetector = new GestureDetector(this, this);
imageView = findViewById(R.id.imageView);
btnStart = findViewById(R.id.btn_start);
btnStart.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (!isRecording && !isPlaying) {
isRecording = true;
gesturePoints.clear();
Toast.makeText(MainActivity.this, "Recording started", Toast.LENGTH_SHORT).show();
} else if (isRecording) {
isRecording = false;
Toast.makeText(MainActivity.this, "Recording stopped", Toast.LENGTH_SHORT).show();
} else if (isPlaying) {
isPlaying = false;
Toast.makeText(MainActivity.this, "Playback stopped", Toast.LENGTH_SHORT).show();
}
}
});
imageView.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
if (isRecording) {
int action = event.getActionMasked();
switch (action) {
case MotionEvent.ACTION_DOWN:
gesturePoints.clear();
break;
case MotionEvent.ACTION_MOVE:
float x = event.getX();
float y = event.getY();
long time = System.currentTimeMillis();
gesturePoints.add(new GesturePoint(x, y, time));
break;
case MotionEvent.ACTION_UP:
isRecording = false;
Toast.makeText(MainActivity.this, "Gesture recorded", Toast.LENGTH_SHORT).show();
break;
}
}
return gestureDetector.onTouchEvent(event);
}
});
}
@Override
public boolean onDown(MotionEvent e) {
return false;
}
@Override
public void onShowPress(MotionEvent e) {
}
@Override
public boolean onSingleTapUp(MotionEvent e) {
return false;
}
@Override
public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) {
return false;
}
@Override
public void onLongPress(MotionEvent e) {
}
@Override
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
if (!isRecording && !isPlaying) {
isPlaying = true;
Toast.makeText(MainActivity.this, "Playback started", Toast.LENGTH_SHORT).show();
playGesture();
}
return false;
}
private void playGesture() {
final int[] index = {0};
final long startTime = System.currentTimeMillis();
handler.post(new Runnable() {
@Override
public void run() {
long currentTime = System.currentTimeMillis();
long elapsedTime = currentTime - startTime;
while (index[0] < gesturePoints.size() && elapsedTime >= gesturePoints.get(index[0]).time) {
GesturePoint point = gesturePoints.get(index[0]);
MotionEvent event = MotionEvent.obtain(
startTime + point.time,
currentTime,
MotionEvent.ACTION_DOWN,
point.x,
point.y,
0
);
imageView.dispatchTouchEvent(event);
index[0]++;
}
if (index[0] < gesturePoints.size()) {
handler.post(this);
} else {
isPlaying = false;
Toast.makeText(MainActivity.this, "Playback finished", Toast.LENGTH_SHORT).show();
}
}
});
}
private static class GesturePoint {
public float x;
public float y;
public long time;
public GesturePoint(float x, float y, long time) {
this.x = x;
this.y = y;
this.time = time;
}
}
}
```
在onCreate方法中,我们初始化了GestureDetector和ImageView,并设置了一个点击事件监听器来启动/停止手势录制和播放。
ImageView的触摸事件监听器中,我们记录了手势点的坐标和时间,并在手指抬起时停止手势录制。
GestureDetector的手势事件监听器中,我们在检测到快速滑动手势时开始手势播放。
playGesture方法中,我们使用Handler来模拟手势的点击操作,根据手势点的时间和当前时间计算出每个手势点的点击时间,并使用dispatchTouchEvent方法来模拟手势的点击操作。
注意:要在AndroidManifest.xml文件中添加以下权限:
```
<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
```
这是因为在Android 6.0以上的版本中,需要获取WRITE_SETTINGS权限才能够模拟点击操作。
希望这个示例对你有帮助!
用python编写一个自动点击的手机软件
好的,对于自动点击的手机软件,你可以使用Python的第三方库Appium来实现。以下是具体步骤:
1. 首先需要安装Appium环境和相关驱动程序。
2. 在Python中安装Appium-Python-Client库。可以使用pip install Appium-Python-Client命令进行安装。
3. 使用Python编写脚本,连接到Appium服务器,打开需要自动化操作的应用程序。
4. 使用Appium-Python-Client库中的TouchAction类和WebDriverWait类实现自动化点击操作。
例如,下面是一个简单的Python代码片段,演示如何点击一个按钮:
```python
from appium import webdriver
from appium.webdriver.common.touch_action import TouchAction
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
# 启动Appium服务器
server = {
'host': '127.0.0.1',
'port': 4723
}
driver = webdriver.Remote('http://{host}:{port}/wd/hub'.format(**server), {})
# 打开需要自动化操作的应用程序
caps = {
'deviceName': 'Android Emulator',
'appPackage': 'com.example.app',
'appActivity': '.MainActivity'
}
driver = webdriver.Remote('http://{host}:{port}/wd/hub'.format(**server), caps)
# 等待元素出现,并且点击
wait = WebDriverWait(driver, 10)
button = wait.until(EC.element_to_be_clickable((By.ID, 'com.example.app:id/button')))
action = TouchAction(driver)
action.tap(button).perform()
# 关闭Appium服务器和应用程序
driver.quit()
```
上述代码片段中的“com.example.app”和“MainActivity”需要替换为你自己的应用程序包名称和主活动名称。此外,你还需要使用Appium提供的UI Automator Viewer工具来查找应用程序中需要点击的UI元素的ID或其他属性。
希望这对你有所帮助!