Code example for SurfaceHolder

Methods: setKeepScreenOn

    private void updateSurfaceScreenOn() { 
        if (mSurfaceHolder != null) {
            mSurfaceHolder.setKeepScreenOn(mScreenOnWhilePlaying && mStayAwake);
     * Convenience method to create a WindPlayer for a given Uri. 
     * On success, {@link #prepare()} will already have been called and must not be called again. 
     * <p>When done with the WindPlayer, you should call  {@link #release()}, 
     * to free the resources. If not released, too many WindPlayer instances will 
     * result in an exception.</p> 
     * @param context the Context to use 
     * @param uri the Uri from which to get the datasource 
     * @param holder the SurfaceHolder to use for displaying the video 
     * @return a WindPlayer object, or null if creation failed