can some one please tell me how to write a program in JAVA ECLIPSE for touch and changing the direction of player or any character (for instance as in Temple Run)

You're asking for complex things to be explained in a simple way.. Go get started with Android programming and explore the SDK. Read tutorials, I'm sure you will find loads content regarding using the gyroscope in the phone.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.