-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
54 changed files
with
1,064 additions
and
1,064 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
...java/org/cosysoft/device/DeviceStore.java → ...m/github/cosysoft/device/DeviceStore.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...g/cosysoft/device/android/AndroidApp.java → ...b/cosysoft/device/android/AndroidApp.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package org.cosysoft.device.android; | ||
package com.github.cosysoft.device.android; | ||
|
||
|
||
public interface AndroidApp { | ||
|
232 changes: 116 additions & 116 deletions
232
...osysoft/device/android/AndroidDevice.java → ...osysoft/device/android/AndroidDevice.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,116 +1,116 @@ | ||
package org.cosysoft.device.android; | ||
|
||
import java.awt.Dimension; | ||
import java.awt.image.BufferedImage; | ||
import java.util.List; | ||
import java.util.Locale; | ||
|
||
import org.cosysoft.device.model.ClientDataInfo; | ||
import org.cosysoft.device.model.DeviceInfo; | ||
|
||
import com.android.ddmlib.Client; | ||
import com.android.ddmlib.IDevice; | ||
import com.android.ddmlib.logcat.LogCatListener; | ||
|
||
/** | ||
* | ||
* @author ltyao | ||
* | ||
*/ | ||
public interface AndroidDevice { | ||
|
||
/** | ||
* test only | ||
* | ||
* @return | ||
*/ | ||
IDevice getDevice(); | ||
|
||
String getSerialNumber(); | ||
|
||
Locale getLocale(); | ||
|
||
String getName(); | ||
|
||
AndroidDeviceBrand getBrand(); | ||
|
||
Dimension getScreenSize(); | ||
|
||
void tap(int x, int y); | ||
|
||
void swipe(int x1, int y1, int x2, int y2); | ||
|
||
BufferedImage takeScreenshot(); | ||
|
||
void takeScreenshot(String fileUrl); | ||
|
||
boolean isDeviceReady(); | ||
|
||
boolean isScreenOn(); | ||
|
||
DeviceTargetPlatform getTargetPlatform(); | ||
|
||
String currentActivity(); | ||
|
||
void invokeActivity(String activity); | ||
|
||
/** | ||
* io.appium.unlock/.Unlock | ||
*/ | ||
void unlock(); | ||
|
||
void install(AndroidApp app); | ||
|
||
boolean isInstalled(String appBasePackage); | ||
|
||
boolean isInstalled(AndroidApp app); | ||
|
||
void uninstall(AndroidApp app); | ||
|
||
void uninstall(String appBasePackage); | ||
|
||
boolean start(AndroidApp app); | ||
|
||
void forwardPort(int local, int remote); | ||
|
||
void removeForwardPort(int local); | ||
|
||
void clearUserData(AndroidApp app); | ||
|
||
void clearUserData(String appBasePackage); | ||
|
||
void kill(AndroidApp aut); | ||
|
||
void kill(String appBasePackage); | ||
|
||
String runAdbCommand(String parameter); | ||
|
||
/** | ||
* @see KeyEvent | ||
* @param value | ||
*/ | ||
void inputKeyevent(int value); | ||
|
||
String getExternalStoragePath(); | ||
|
||
String getCrashLog(); | ||
|
||
boolean isWifiOff(); | ||
|
||
DeviceInfo getDeviceInfo(); | ||
|
||
void restartADB(); | ||
|
||
/** | ||
* | ||
* @param logCatListener | ||
*/ | ||
void addLogCatListener(LogCatListener logCatListener); | ||
|
||
void removeLogCatListener(LogCatListener logCatListener); | ||
|
||
List<ClientDataInfo> getClientDatasInfo(); | ||
|
||
Client getClientByAppName(String appName); | ||
|
||
} | ||
package com.github.cosysoft.device.android; | ||
|
||
import java.awt.Dimension; | ||
import java.awt.image.BufferedImage; | ||
import java.util.List; | ||
import java.util.Locale; | ||
|
||
import com.github.cosysoft.device.model.ClientDataInfo; | ||
import com.github.cosysoft.device.model.DeviceInfo; | ||
|
||
import com.android.ddmlib.Client; | ||
import com.android.ddmlib.IDevice; | ||
import com.android.ddmlib.logcat.LogCatListener; | ||
|
||
/** | ||
* | ||
* @author ltyao | ||
* | ||
*/ | ||
public interface AndroidDevice { | ||
|
||
/** | ||
* test only | ||
* | ||
* @return | ||
*/ | ||
IDevice getDevice(); | ||
|
||
String getSerialNumber(); | ||
|
||
Locale getLocale(); | ||
|
||
String getName(); | ||
|
||
AndroidDeviceBrand getBrand(); | ||
|
||
Dimension getScreenSize(); | ||
|
||
void tap(int x, int y); | ||
|
||
void swipe(int x1, int y1, int x2, int y2); | ||
|
||
BufferedImage takeScreenshot(); | ||
|
||
void takeScreenshot(String fileUrl); | ||
|
||
boolean isDeviceReady(); | ||
|
||
boolean isScreenOn(); | ||
|
||
DeviceTargetPlatform getTargetPlatform(); | ||
|
||
String currentActivity(); | ||
|
||
void invokeActivity(String activity); | ||
|
||
/** | ||
* io.appium.unlock/.Unlock | ||
*/ | ||
void unlock(); | ||
|
||
void install(AndroidApp app); | ||
|
||
boolean isInstalled(String appBasePackage); | ||
|
||
boolean isInstalled(AndroidApp app); | ||
|
||
void uninstall(AndroidApp app); | ||
|
||
void uninstall(String appBasePackage); | ||
|
||
boolean start(AndroidApp app); | ||
|
||
void forwardPort(int local, int remote); | ||
|
||
void removeForwardPort(int local); | ||
|
||
void clearUserData(AndroidApp app); | ||
|
||
void clearUserData(String appBasePackage); | ||
|
||
void kill(AndroidApp aut); | ||
|
||
void kill(String appBasePackage); | ||
|
||
String runAdbCommand(String parameter); | ||
|
||
/** | ||
* @see KeyEvent | ||
* @param value | ||
*/ | ||
void inputKeyevent(int value); | ||
|
||
String getExternalStoragePath(); | ||
|
||
String getCrashLog(); | ||
|
||
boolean isWifiOff(); | ||
|
||
DeviceInfo getDeviceInfo(); | ||
|
||
void restartADB(); | ||
|
||
/** | ||
* | ||
* @param logCatListener | ||
*/ | ||
void addLogCatListener(LogCatListener logCatListener); | ||
|
||
void removeLogCatListener(LogCatListener logCatListener); | ||
|
||
List<ClientDataInfo> getClientDatasInfo(); | ||
|
||
Client getClientByAppName(String appName); | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
...ft/device/android/AndroidDeviceBrand.java → ...ft/device/android/AndroidDeviceBrand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...org/cosysoft/device/android/KeyEvent.java → ...hub/cosysoft/device/android/KeyEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.