Code example for SparseArray

Methods: get, remove

0
	 * @param replyId the reply id 
	 * @param data the data 
	 */ 
	public void sendReplyToDebugService(int replyId, String data) {
		 
		ReplyReceiver rec = replyReceivers.get(replyId);
		if (rec != null) {
			try { 
				rec.onReply(new JSONObject(data));
			} catch (JSONException e) {
				Log.e(TAG, "replyToServer failed for replyId: " + replyId, e);
			} 
		} 
		replyReceivers.remove(replyId);
	} 
	 
	/** 
	 * Gets the queued message. Will be called by the webview.  
	 * 
	 * @param wait true will block the call till new data is available 
	 * @return the queued message