How can i screen always on

my game is use accelometer
and no touch
so it will be dark and screen off

i want always screen on
and i found FLAG_KEEP_SCREEN_ON flag but i don’t know how to use it

help me

You can use the setKeepScreenOn() method or xml attribute with the android openGL view.
see http://developer.android.com/reference/android/view/View.html#setKeepScreenOn(boolean)

Within the HelloWorld Example you could modify the ApplicationDemo.java (found under android/src/org/cocos2dx/application/)

setContentView(R.layout.helloworld_demo);
mGLView = (Cocos2dxGLSurfaceView) findViewById(R.id.helloworld_gl_surfaceview);
mGLView.setTextField((Cocos2dxEditText)findViewById(R.id.textField));

// set the keep screen on flag
mGLView.setKeepScreenOn(true);

Or you could modify the layout.xml of your application and add the android:keepScreenOn to true for your OpenGL view.