Web Application (Android Servlet) Sample Code: Bug in Installation Code
Summary
Sometimes, the SOP application may fail to install its web application with null pointer exception. This may be caused by the use of the sample code. Please read this document for details, and correct the application if necessary.
Symptom
At an unexpected timing, the SOP application installs the web application, and it fails with NullPointerException.
Cause
Custom authentication for SmartSDK setup process
SmartSDK applications may require a custom setup process for configuring the device for custom authentication. Please refer to attached file for details on configuring a device for custom authentication locally using the device service mode, and remotely using RXOP.
Understanding a ListView
The ListView is a specialized control that is optimized for displaying long lists of items. It's very efficient in how it creates, recycles, and displays views, and is optimized to scroll very smoothly.
Should I use AbsoluteLayouts in my UI for an Android base application?
Here are some short videos on why you should think twice before using AbsoluteLayout in your UI implementations. Currently we have the G1 and the G2 panel and in the future there may be others so you'll want your Android base application to follow the best practices that are laid out by the Android creators.
Android Software Stack and Gradle - Developing Android Apps
Learning the Android Software Stack is a challenge of its own and will require you to head out to the Android Development site in search of more information. Below is a video that will cover some of the basics. The video also covers Gradle.
SOP Tips - Android Apps must handle ConfigurationChange events
On the SmartOperation Panel (G2), the following configuration change events may occur:
- "locale" – when the language is changed
- "keyboard" – when the USB keyboard is connected
By default, Android restarts the running activities upon the the configuration change events. If you would like to avoid the activity restart, your SOP application must handle the events by itself.
Uroboros - Installer for Development
Please note
It is possible to extract the "InstallerForDevelpmentG2.zip" [sic] from the RICOH_Uroboros.jarfile the using any zip utility and installing that to G2 devices directly without using the self-installation method described here. This will install v3.1 of the Installer For Development suitable for G2 devices only.
Usage
SOP Tips - Handling Runtime Changes
The Android OS restarts activities when the Android device configuration changes. See: http://developer.android.com/guide/topics/resources/runtime-changes.html
On the Ricoh Smart Operational Panel (SOP), plugging in or removing a USB keyboard is an example of the configuration change.
To avoid the activity restart, your application must handle the device configuration change event, as described in the Android development document.
SOP Tips - Handling process termination by Android OS
According to the process lifecycle, the Android OS may terminate background applications at any time.