Code example for JSONArray

Methods: put, toString

0
		 
	    // check to see if we have registered a JavaScript native event handler for this event 
	    String jsCommand = jsNativeEventsRegister.get("appResume");
	    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. 
			 */ 
			eventParameters.put("appResume"); 
	    	String aJSONString = eventParameters.toString();
	    	String aJSCallString = "javascript:handleJSONRequest('"+jsCommand+"', '"+aJSONString+"')";
	    	System.out.println( aJSCallString );
	    	QCAndroid.getWebView().loadUrl(aJSCallString);
	    } 
	} 
	/* 
	 *  This code is here to support zebra crossing.  since it is not yet included I've commented it out. 
	 * 
	@Override