Code example for JSONArray

Methods: puttoString

	        // menu-button pressed 
		    // check to see if we have registered a JavaScript native event handler for this event 
		    String jsCommand = jsNativeEventsRegister.get("menuButton");
		    if( jsCommand != null && jsCommand != "__available__" ){
		    	// start the JavaScript command stack specified by jsCommand 
		    	JSONArray eventParameters = new JSONArray();
				 *  We'll need to add any information that needs to be passed back to 
				 *  JavaScript as a parameter of the command stack here. 
		    	String aJSONString = eventParameters.toString();
		    	String aJSCallString = "javascript:handleJSONRequest('"+jsCommand+"', '"+aJSONString+"')";
	        return true; 
	    return super.onKeyDown(keyCode, event);
Connect your IDE to all the code out there  Get Codota for Java