I need to insert some native functionality into my Android app built with PhoneGap/Cordova (v4.2). Specifically, I want to override the
onWindowFocusChanged() of the
CordovaActivity class in my app, and I don't think I can do this through a plugin. (I'm building a kiosk application and I want to collapse the status bar as soon as it is opened. The code works in another app (which is native) and I'm trying to do the same here)
I've already edited the
CordovaApp.java file located in
platform/android/src/[package-name-inverse-URI], rebuilt the project using the CLI command
phonegap build android to generate an APK, but unfortunately, I was not successful.
Oddly enough, even when I purposely type erroneous/invalid java code into that file and rebuild, no error messages are displayed, which led me to believe that this file is not compiled at all on the build process.
Is there any way that I could edit the main activity file and compile it into the APK?