Full explanation can be found in this blog post. The source code is compatible with TensorFlow 1.1
voxlogic/TensorFlow-on-Android-for-Human-Activity-Recognition-with-LSTMs
iPython notebook and Android app that shows how to build LSTM model in TensorFlow and deploy it on Android
Jupyter Notebook