RM Brige provides an API to access BroadLink™ RM1/RM2 devices.
You can either install the app from Google Play or download the APK directly from this page. This page also includes the RM Bridge API documentation along with a sample Code Management implementation, which also can be downloaded for offline usage.