manniru
4/25/2018 - 12:28 PM

smarttv_firebase1.js

var url = 'https://realtime-system.firebaseio.com/smarttv/test/.json';

	jQuery.ajax({
		url : url,
		success : function(result) {
			// var result2 = jQuery(result).find('API > item');
			jQuery("#MainTitleBar").html(result);
			alert('13132');
		}
	});
	
	
	
	$.ajax({
		type : 'POST',
		url : "https://realtime-system.firebaseio.com/smarttv/test/.json",
	      //headers : { Authorization : 'key=' + 'xxxxx-xxxxxxxxxx-xxxxxxxxx' },
	      contentType : 'json',
	      data : JSON.stringify({
	    	  "to": "/topics/videos",
	    	  "data": {
	    		  "message": "This is push for video!"
	    			  }
	      }),

	      success : function(response) {
	          alert(response);
	      },
	        error : function(xhr, status, error) {
	          alert(xhr.error);                   
	      }
	  });