This is an open-source unofficial Android client for Alubi Lpms-B series.
Due to the lower version of the official open source apk, and the official new version of the APK does not provide source code. So I wrote a new open source demo.
- Android Studio 3.2 or latest
- Kotlin 1.2.51 or latest
- Android SDK 28 or latest
- You Android phone kernal version required 21 or above
- Android Jetpack 1.0.0-beta3 or latest
- Please give this app bluetooth permission
- You may need to pair Lpms-B before open the app
This diagram is a dead-simple which described how to build an easy motion identification system.
from flask import Flask
from flask import request
app = Flask(__name__)
@app.route('/save', methods=['POST'])
def save():
print (request.form.get('result','OKK'))
return request.form.get('result','OKK')
if __name__ == '__main__':
app.run(port=23456, host='192.168.0.2')
- In Android source code, we use Kotlin
MutableList<LpmsData>
to save temp result. - When the HTTP request is going to launch, we use
GSON.toJson()
function to convert temp result to formatted string. - If you don't know how to parse JSON or unfamiliar with it, please check JSON.org.
The project dependences are as follows.
- OKHTTP3 to replace Android default HTTP client.
- RxJava2 to make HTTP request and response async.
- Retrofit2 to build local HTTP function interface.
- GraphView to show real-time data in chart.
- Single LpmsData(X-float,I-integer,L-long)
{"acc":[X,X,X],"euler":[X,X,X],"frameNumber":I,"gyr":[X,X,X],"imuId":I,"linAcc":[X,X,X],"mag":[X,X,X],"pressure":X,"quat":[X,X,X,X],"timestamp":L}
- List of LpmsData
[{Single LpmsData},{Single LpmsData},{Single LpmsData}...]
...