While you are free to use all or some of the code we provide as sample applications [see: Smart Operation Panel > Sample Applications > Development Guide (Sample application)] please note that they are provided without any guarantee of fitness or suitablility.
Specifically, RiDP does not support the sample applications as we do our supported APIs and development tools. We provide the sample code for your reference only. That is, all sample source code and the convenience libraries in any project bundles are provided with the following provision:
We make no warranty, express or implied, regarding this document and the sample codes described in this document. We will not be held responsible for any of our customer’s losses, damages resulting from lost profits, or claims from any third party on using this document and the sample codes described in this document.
Also, RiDP refers to typical open source libraries in the sample applications code. This does not imply that we support or encourage the use of any specific third-party libraries. Again, they are provided as examples for your own coding.
The sample applications use and introduce the open source software indicated in OSS License.
We update the sample apps from time to time, and they generally will compile for and run on most devices without modification. But the sample code has not been well tested and does not necessarily represent good coding practice. Sample apps are intended to show how to use our APIs in your own applications. Certain shortcuts may have been taken with respect to error handling or exception cases. There may even be obvious bugs where we have (intentionally or not) implemented Android API or other third-party APIs incorrectly. Do not assume the sample code has implemented any third-party API, including Android API, correctly.
In short, sample application code we provide as part of the development kit, or as examples in Support Incidents, should be treated the same way you treat any code example found on the internet: with a healthy dose of suspicion and wariness. The assumption is that any sample code you borrow will not be used as-is and treated as a "black box" but rather will be treated as untested code, and properly exercised before being released into a production environment.
In fact, we'd recommend that when importing some or all of the sample application code that you change the package name to your own packaging, perhaps in a sub-package indicating where it came from. This is one way to signal to your own development team that this code is now your own responsibility.
If you do find a defect or problem in a sample application feel free to report it via a new RiDP Support Incident, and we may address the defect in a future development kit.