You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
console.log("Detached device with identifier: "+deviceInfoData.identifier);
1266
+
});
1267
+
```
1268
+
1269
+
* `deviceLogData` - Raised when attached device reports any information. This is the output of `adb logcat` for Android devices. For iOS this is the `iOS SysLog`.
1270
+
The event is raised for any device that reports data. The callback function has two arguments - `deviceIdentifier` and `reportedData`. <br/><br/>
* `applicationInstalled` - Raised when application is installed on a device. The callback has two arguments - `deviceIdentifier` and `applicationIdentifier`. <br/><br/>
console.log("Application "+ applicationIdentifier +" has been installed on device with id: "+ identifier);
1283
+
});
1284
+
```
1285
+
1286
+
* `applicationUninstalled` - Raised when application is removed from device. The callback has two arguments - `deviceIdentifier` and `applicationIdentifier`. <br/><br/>
console.log("Application "+ applicationIdentifier +" has been uninstalled from device with id: "+ identifier);
1291
+
});
1292
+
```
1293
+
1294
+
* `debuggableAppFound` - Raised when application on a device becomes available for debugging. The callback has one argument - `applicationInfo`. <br/><br/>
console.log("Application "+applicationInfo.appIdentifier+" is available for debugging on device with id: "+applicationInfo.deviceIdentifier);
1299
+
});
1300
+
```
1301
+
Sample result for `applicationInfo` will be:
1302
+
```JSON
1303
+
{
1304
+
"deviceIdentifier":"4df18f307d8a8f1b",
1305
+
"appIdentifier":"com.telerik.Fitness",
1306
+
"framework":"NativeScript",
1307
+
"title":"NativeScript Application"
1308
+
}
1309
+
```
1310
+
1311
+
* `debuggableAppLost` - Raised when application on a device is not available for debugging anymore. The callback has one argument - `applicationInfo`. <br/><br/>
console.log("Application "+applicationInfo.appIdentifier+" is not available for debugging anymore on device with id: "+applicationInfo.deviceIdentifier);
1316
+
});
1317
+
```
1318
+
Sample result for `applicationInfo` will be:
1319
+
```JSON
1320
+
{
1321
+
"deviceIdentifier":"4df18f307d8a8f1b",
1322
+
"appIdentifier":"com.telerik.Fitness",
1323
+
"framework":"NativeScript",
1324
+
"title":"NativeScript Application"
1325
+
}
1326
+
```
1327
+
1328
+
* `emulatorImageFound` - Raised when a new Android Emulator Image or iOS Simulator is created/installed on the system. The callback has a single argument that describes the new image:
console.log("Added new emulator image", emulatorImageInfo);
1332
+
});
1333
+
```
1334
+
`emulatorImageInfo` is of type [Moble.IDeviceInfo](https://github.com/telerik/mobile-cli-lib/blob/61cdaaaf7533394afbbe84dd4eee355072ade2de/definitions/mobile.d.ts#L9-L86).
1335
+
1336
+
* `emulatorImageLost` - Raised when an Android Emulator Image or iOS Simulator is removed from the system. The callback has a single argument that describes the removed image:
`emulatorImageInfo` is of type [Moble.IDeviceInfo](https://github.com/telerik/mobile-cli-lib/blob/61cdaaaf7533394afbbe84dd4eee355072ade2de/definitions/mobile.d.ts#L9-L86).
1343
+
1243
1344
## How to add a new method to Public API
1244
1345
CLI is designed as command line tool and when it is used as a library, it does not give you access to all of the methods. This is mainly implementation detail. Most of the CLI's code is created to work in command line, not as a library, so before adding method to public API, most probably it will require some modification.
1245
1346
For example the `$options` injected module contains information about all `--` options passed on the terminal. When the CLI is used as a library, the options are not populated. Before adding method to public API, make sure its implementation does not rely on `$options`.
0 commit comments