My Object doesn't rotate when i tracked

I worked a code to move the cube using touch and I tested it on an Android device, but the problem is about tracking the same cube stops touching and turning off. I tried using automatic rotation glasses instead of touch, but the same problem is that the cube is rotating properly and they all stop moving when tracking, what is the explanation about this problem?!

Anyone !