android-bot
Version:
Android-bot is built on the AutoBot JavaScript library and provides features such as wireless screen casting and real-time control within a local network, key simulation, screen recording, screenshot capture, layout analysis, file management, application
167 lines (166 loc) • 4.22 kB
TypeScript
export interface IScreenInfo {
rotation: number;
width: number;
height: number;
}
export interface IMemoryInfo {
total: number | any;
free: number | any;
totalStr: string | any;
freeStr: string | any;
}
export interface IDiskInfo {
sdcardTotal: number | any;
sdcardFree: number | any;
phoneTotal: number | any;
phoneFree: number | any;
phoneTotalStr: string | any;
phoneFreeStr: string | any;
sdcardTotalStr: string | any;
sdcardFreeStr: string | any;
}
export interface IIdInfo {
meid: string;
pseudoID: string;
imei: string;
deviceId: string;
}
export interface IDeviceInfo {
clientVersion: string;
brand: string;
id: string;
display: string;
product: string;
device: string;
board: string;
manufacturer: string;
model: string;
socManufacturer: string;
socModel: string;
bootloader: string;
hardware: string;
serial: string;
sdkInt: string;
release: string;
displayInfo: IScreenInfo;
memoryInfo: IMemoryInfo;
diskInfo: IDiskInfo;
devicesInfo: IIdInfo;
}
export interface IUIObject {
index: number | any;
class: string | any;
clickable: boolean | any;
visibleToUser: boolean | any;
enabled: boolean | any;
checked: boolean | any;
resourceId: string | any;
text: string | any;
bound: string | any;
children?: Array<IUIObject> | null;
}
export interface IContact {
number: string;
name: string;
id: string;
}
export interface Point {
x: number;
y: number;
}
export interface IGesture {
delay?: number;
duration: number;
points: Array<Point>;
}
export interface INotificationMessage {
notification_package: string;
notification_title: string;
notification_content: string;
intent_action: string;
intent_scheme: string;
intent_data: string;
intent_packageName: string;
intent_shortClassName: string;
intent_uri: string;
notification_extras_source_bundle: any;
notification_intent_source_bundle: any;
}
export type NotificationChangeCallback = (message: INotificationMessage) => void;
export type ClipTextChangeCallback = (text: string) => void;
export type ErrListener = (err: string) => void;
export type CloseListener = (e: CloseEvent) => void;
export interface ScreenOrentationChangeCallback {
(width: number, height: number, rotation: number, isLandscape: boolean): void;
}
export interface ScreenChangeCallback {
(screenImage: any): void;
}
export declare class ScreenRotation {
mRotation: number;
constructor(rotation: number | string);
isLandscape(): boolean;
}
export declare class ScreenInfo implements IScreenInfo {
width: number;
height: number;
rotation: number;
mRotation: ScreenRotation;
constructor(iScreenInfo: IScreenInfo);
isLandscape(): boolean;
}
export interface ITopActivityInfo {
shortClassName: string;
className: string;
main: string;
packageName: string;
}
export declare class TopActivityInfo implements ITopActivityInfo {
shortClassName: string;
className: string;
main: string;
packageName: string;
startPath: string;
constructor(iTopInfo: ITopActivityInfo);
}
export interface IFileItem {
isFile: boolean;
name: string;
path: string;
size: number;
isRead: boolean;
isWrite: boolean;
isExecute: boolean;
lastModified: number;
}
export declare class FileItem {
isFile: boolean;
name: string;
path: string;
size: number;
isRead: boolean;
isWrite: boolean;
isExecute: boolean;
lastModified: number;
constructor(iFileItem: IFileItem);
static convertFileItem(iFileItems: Array<IFileItem>): Array<FileItem>;
}
export interface ActiveInfo {
uid: string;
serverTime: number;
exptime: number;
disabled: boolean;
validate: boolean;
}
export declare class ShortPackageInfo {
packageName: string;
label: string;
icon: string;
versionCode: number;
versionName: string;
minSdkVersion: string;
targetSdkVersion: number;
firstInstallTime: number;
lastUpdateTime: number;
}
export type IRunScriptType = "run" | "stop" | "stopAll";