package com.hughisaacs2.cordova.plugins.androidscreensaverplugin;

import android.annotation.TargetApi;
import android.service.dreams.DreamService;
import android.webkit.WebView;
import org.apache.cordova.*;

@TargetApi(17)
public class ScreensaverProvider extends DreamService {
     @Override
     CordovaWebView cwv;
    public void onAttachedToWindow() {
        //super.onAttachedToWindow();
        // Allow user touch
        //setInteractive(true);
        // Hide system UI
        //setFullscreen(true);
        // Set the dream layout
        //WebView webView = new WebView(this);
        //setContentView(webView);
        //webView.loadUrl("file:///android_asset/www/screensaver.html");
         
        super.onAttachedToWindow();
        // Allow user touch
        setInteractive(true);
        // Hide system UI
        setFullscreen(true);
        // Set the dream layout
		cwv webview = new CordovaWebView(this);
		org.apache.cordova.Config.init(this);
        setContentView(cwv);
        cwv.loadUrl(Config.getStartUrl());
    }
}

@@ -368,370 +368,8 @@
  %7B%0D%0A
-        //super.onAttachedToWindow();%0D%0A        // Allow user touch%0D%0A        //setInteractive(true);%0D%0A        // Hide system UI%0D%0A        //setFullscreen(true);%0D%0A        // Set the dream layout%0D%0A        //WebView webView = new WebView(this);%0D%0A        //setContentView(webView);%0D%0A        //webView.loadUrl(%22file:///android_asset/www/screensaver.html%22);%0D%0A         %0D%0A
     
@@ -551,16 +551,167 @@
 layout%0D%0A
+%09//WebView webView = new WebView(this);%0D%0A        //setContentView(webView);%0D%0A        //webView.loadUrl(%22file:///android_asset/www/screensaver.html%22);%0D%0A
 %09%09cwv we

Update ScreensaverProvider.java