public class AndroidDeviceImpl extends Object implements AndroidDevice
AndroidDevice.| Constructor and Description |
|---|
AndroidDeviceImpl() |
AndroidDeviceImpl(com.android.ddmlib.IDevice delegate) |
AndroidDeviceImpl(com.android.ddmlib.IDevice delegate,
AndroidSDK androidSdk) |
| Modifier and Type | Method and Description |
|---|---|
void |
createPortForwarding(int localPort,
int remotePort) |
void |
executeShellCommand(String command) |
void |
executeShellCommand(String command,
AndroidDeviceOutputReciever reciever) |
ActivityManager |
getActivityManager() |
boolean |
getAlreadyRuns() |
String |
getAvdName() |
String |
getConsolePort() |
int |
getDroneGuestPort() |
int |
getDroneHostPort() |
String |
getProperty(String name) |
Screenshot |
getScreenshot() |
String |
getSerialNumber() |
void |
installPackage(File packageFilePath,
boolean reinstall,
String... extraArgs) |
void |
installPackage(String packageFilePath,
boolean reinstall,
String... extraArgs) |
boolean |
isEmulator() |
boolean |
isOffline() |
boolean |
isOnline() |
boolean |
isPackageInstalled(String packageName) |
boolean |
isRecording() |
void |
pull(File remoteFile,
File localFile) |
void |
pull(String remoteFilePath,
String localFilePath) |
void |
push(File localFile,
File remoteFile) |
void |
push(String localFilePath,
String remoteFilePath) |
void |
remove(File remoteFile) |
void |
remove(String remoteFilePath) |
void |
removePortForwarding(int localPort,
int remotePort) |
void |
setActivityManager(ActivityManager activityManager) |
void |
setAlreadyRuns(boolean alreadyRuns) |
void |
setDroneGuestPort(int droneGuestPort) |
void |
setDroneHostPort(int droneHostPort) |
void |
startRecording(File remoteFilePath,
ScreenrecordOptions options) |
void |
startRecording(ScreenrecordOptions options) |
void |
startRecording(String remoteFilePath,
ScreenrecordOptions options) |
Video |
stopRecording(File localFilePath) |
Video |
stopRecording(String localFilePath) |
String |
toString() |
void |
uninstallPackage(String packageName) |
public AndroidDeviceImpl()
public AndroidDeviceImpl(com.android.ddmlib.IDevice delegate)
public AndroidDeviceImpl(com.android.ddmlib.IDevice delegate,
AndroidSDK androidSdk)
public void setActivityManager(ActivityManager activityManager)
setActivityManager in interface AndroidDevicepublic ActivityManager getActivityManager()
getActivityManager in interface AndroidDevicepublic String getSerialNumber()
getSerialNumber in interface AndroidDevicepublic String getAvdName()
getAvdName in interface AndroidDevicepublic String getProperty(String name) throws IOException, AndroidExecutionException
getProperty in interface AndroidDeviceIOExceptionAndroidExecutionExceptionpublic boolean isOnline()
isOnline in interface AndroidDevicepublic boolean isEmulator()
isEmulator in interface AndroidDevicepublic boolean isOffline()
isOffline in interface AndroidDevicepublic String getConsolePort()
getConsolePort in interface AndroidDevicepublic void executeShellCommand(String command) throws AndroidExecutionException
executeShellCommand in interface AndroidDeviceAndroidExecutionExceptionpublic void executeShellCommand(String command, AndroidDeviceOutputReciever reciever) throws AndroidExecutionException
executeShellCommand in interface AndroidDeviceAndroidExecutionExceptionpublic void createPortForwarding(int localPort,
int remotePort)
throws AndroidExecutionException
createPortForwarding in interface AndroidDeviceAndroidExecutionExceptionpublic void removePortForwarding(int localPort,
int remotePort)
throws AndroidExecutionException
removePortForwarding in interface AndroidDeviceAndroidExecutionExceptionpublic void installPackage(File packageFilePath, boolean reinstall, String... extraArgs) throws AndroidExecutionException
installPackage in interface AndroidDeviceAndroidExecutionExceptionpublic void installPackage(String packageFilePath, boolean reinstall, String... extraArgs) throws AndroidExecutionException
installPackage in interface AndroidDeviceAndroidExecutionExceptionpublic boolean isPackageInstalled(String packageName) throws AndroidExecutionException
isPackageInstalled in interface AndroidDeviceAndroidExecutionExceptionpublic void uninstallPackage(String packageName) throws AndroidExecutionException
uninstallPackage in interface AndroidDeviceAndroidExecutionExceptionpublic void pull(String remoteFilePath, String localFilePath) throws Exception
pull in interface AndroidDeviceExceptionpublic void pull(File remoteFile, File localFile) throws Exception
pull in interface AndroidDeviceExceptionpublic void push(String localFilePath, String remoteFilePath) throws Exception
push in interface AndroidDeviceExceptionpublic void push(File localFile, File remoteFile) throws Exception
push in interface AndroidDeviceExceptionpublic void remove(File remoteFile) throws Exception
remove in interface AndroidDeviceExceptionpublic void remove(String remoteFilePath) throws Exception
remove in interface AndroidDeviceExceptionpublic void startRecording(ScreenrecordOptions options) throws Exception
startRecording in interface AndroidDeviceExceptionpublic void startRecording(File remoteFilePath, ScreenrecordOptions options) throws Exception
startRecording in interface AndroidDeviceExceptionpublic void startRecording(String remoteFilePath, ScreenrecordOptions options) throws Exception
startRecording in interface AndroidDeviceExceptionpublic boolean isRecording()
isRecording in interface AndroidDevicepublic Video stopRecording(String localFilePath) throws Exception
stopRecording in interface AndroidDeviceExceptionpublic Video stopRecording(File localFilePath) throws Exception
stopRecording in interface AndroidDeviceExceptionpublic int getDroneHostPort()
getDroneHostPort in interface AndroidDevicepublic int getDroneGuestPort()
getDroneGuestPort in interface AndroidDevicepublic void setDroneHostPort(int droneHostPort)
setDroneHostPort in interface AndroidDevicepublic void setDroneGuestPort(int droneGuestPort)
setDroneGuestPort in interface AndroidDevicepublic Screenshot getScreenshot() throws Exception
getScreenshot in interface AndroidDeviceExceptionpublic void setAlreadyRuns(boolean alreadyRuns)
setAlreadyRuns in interface AndroidDevicepublic boolean getAlreadyRuns()
getAlreadyRuns in interface AndroidDeviceCopyright © 2015 JBoss by Red Hat. All rights reserved.