According to the process lifecycle, the Android OS may terminate background applications at any time.
- The SOP application may be terminated while its scan or print job is running if the application is switched to a background task.
- The SOP application must be able to handle the jobs after the unexpected termination.
See the excerpt from the SmartSDK document:
SmartOperation Panel > Development Guide > Common > Common Functional Specifications and Notes
The following is an important note on job management by a Service:
Implement an application to enable cancelling an active job at the time the application ends. This is because an application may be terminated by Android OS since an application complies with the criteria of Android Process Lifecycle.
When an application with Service is terminated by Android OS, the application is automatically restarted after a certain period of time. However, when an application is restarted, only Service is started and Activity is not started within the application. An application developer must consider this fact for designing an application.
For details on Process Lifecycle, refer to the following URL: http://developer.android.com/guide/components/processes-and-threads.html#Lifecycle
Additional Notes:
The sample applications in SmartSDK V1.04 nor V2.10 implements this Service class usage.