Thursday 30 July 2020

Maximo Anywhere 7.6.4 - Android Emulator and Debug

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
image 3138

2. Go to SDK Tools tab, install Android emulator, SDK platform-tools, and SDK tools

image 3139

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

image 4624

4. Click Download 

image 4625


5. Enter a name 


6. Click Finish 

Virtual device is installed

image 4626


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

image 3140

11. Log in as a mobile user

image 3141

12. A work list shows up

image 3142

About screen shows
Build Number 20200219

image 3143


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

image 5087




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

image 3966


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:

image 5088


3. Go to Sources tab and open a javascript file

You can put breakpoints and hover the mouse over variables to check the values

image 5089

No comments:

Post a Comment

IBM Readme for IBM Maximo Asset Management 7.6.1.3 Fix Pack

  Fix Readme Abstract This fix pack updates IBM® Maximo® Asset Management version 7.6.1, 7.6.1.1, and 7.6.1.2 Content IBM Maximo Asset Manag...