working version of Android sensor recognition