Android emulator is a useful tool for testing Anywhere applications on various devices and Android API levels.
Steps
Emulator various Android devices:
1. Open Android Studio
Go to Tools menu and select SDK manager option
From the SDK Platforms tab, install Android 9 API 28
2. Go to SDK Tools tab, install Android emulator, SDK platform-tools, and SDK tools
3. Go to Tools menu and select AVD manager option
Click Create Virtual Device
Select Phone from the left pane
Select a device. For example, "Pixel 2" device
4. Click Download
5. Enter a name
6. Click Finish
Virtual device is installed
7. Click the play button to launch the AVD in emulator
8. Open a
Windows PowerShell
Navigate to the android SDK platform-tools directory. For example,
cd C:\Users\MAYON\AppData\Local\Android\Sdk\platform-tools
Enter
adb devices
Output shows the emulator attached
C:\Users\MAYON\AppData\Local\Android\Sdk\platform-tools> adb devices
List of devices attached
emulator-5554 device
Install APK file
C:\Users\MAYON\AppData\Local\Android\Sdk\platform-tools> adb install C:\Users\MAYON\AppData\Local\Android\Sdk\platform-tools\WorkExecution-7.6.4.apk
Performing Streamed Install
Success
9. Go to the emulator and swipe up to show a list of applications
10. Open IBM Work app and enter Maximo® URL
11. Log in as a mobile user
12. A work list shows up
About screen shows
Build Number 20200219
Debug in Chrome:
1. Go to Chrome browser and press F12 to invoke Developer Tools
2. Go to "Remote Devices" tab
3. Select the device
4. Click the Inspect button under WebView
5. Go to the emulator and log in
Alternatively, you can use a real device:
1. Run a build to generate APK
2. Copy the APK file to an Android device and install the APK
3. Install Vysor
4. Connect Android Device to a development machine via a USB cable
5. Go to Chrome browser and press F12 to invoke Developer Tools
6. Go to "Remote Devices" tab and select "Discover USB Devices" checkbox
7. Select the device
8. Click the Inspect button and select "Discover USB Devices" checkbox
Run OSLC query from a browser
If you are encountering a performance issue, you can run the query in a browser to check how long it takes to return an output.
1. Copy a OSLC query from Network tab
2. Append the username and password to the end of the url:
&_lid=username&_lpwd=password
NOTE: replace username and password with the appropriate log in credential
An example OSLC query with username and password:
http://hostname:port/maximo/oslc/os/oslcinvbalview?savedQuery=test1&oslc.select=dcterms%3Aidentifier%2Cspi%3Abinnum%2Cspi%3Aphyscnt%2Cspi%3Acurbal%2Cspi%3Aconditioncode%2Cspi%3Aitemnum%2Cspi%3Adescription%2Cspi%3Aitemsetid%2Cspi%3Aabctype%2Cspi%3Aissueunit%2Cspi%3Alocation%2Cspi%3Asiteid%2Cspi%3Alotnum%2Cspi%3Aadjustedphyscnt%2Cspi%3Aphyscntdate%2Cspi%3Aadjustedphyscntdate&oslc.pageSize=40&oslc.orderBy=%2Bspi%3Alocation%2C%2Bspi%3Abinnum&_lid=wilson&_lpwd=wilson
Here is an example output:
3. Go to Sources tab and open a javascript file
You can put breakpoints and hover the mouse over variables to check the values
No comments:
Post a Comment