You should really be saving the state of the development mode (or local mode, whatever you call it) somewhere, maybe as a static variable in the native class? It has absolutely nothing to do with webview.