title: Can I override onCreate() function via cordova plugin
body: <p>By default, after I create a cordova android project, the MainActivity.java looks like this:</p>
  
  <pre><code>    import android.os.Bundle;
      import org.apache.cordova.*;
  
      public class MainActivity extends CordovaActivity
      {
           @Override
           public void onCreate(Bundle savedInstanceState)
           {
              super.onCreate(savedInstanceState);
              // Set by &lt;content src="index.html" /&gt; in config.xml
              loadUrl(launchUrl);
           }
        }
  </code></pre>
  
  <p>Now I need to add a line <code>getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
  </code> before the <code>loadUrl(launchUrl)</code> to prevent the app go to sleep mode.
  But in some reason we don't want to break the default structure, that is, can I use cordova plugin to override <code>onCreate()</code> function separately other than insert this line of code directly?</p>
  
  <p>Or does anyone have an idea to achieve the goal to keep your app always in front? </p>