title: Phonegap,Angular JS Web Service Call
body: <p>We are working on an angular js application to build an android app using phonegap. We have first built the application with the various web service calls and tested it in the chrome emulator for various devices and it works fine. </p>
  
  <p>We then imported the project in Intel XDK and integrated phonegap deviceready and other network related checks in the application. It still works fine in the emulator and in app preview mode. </p>
  
  <p>However,After building the project into an APK, we have observed that the http.get and http.post methods of angular js always returns 404 error. After reading about on Google we have tried adding the header related data as part of parameter too but still it fails. Below is a snippet of our sample call</p>
  
  <pre><code>$scope.get_special = function() {
  alert('test');
  $http({
      url: BASE_URL + "?app_module=special",
      method: 'GET',
      headers: {
          'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
      }
  }).success(function(data) {
      alert(data);
      $scope.specials = data.arr;
      $scope.$apply();
  }).error(function(data, status, headers, config) {
      $scope.isLoaderOn = false;
      $scope.isError = true;
      alert('error');
      alert(data);
      alert(status);
      alert(headers);
      $scope.err_msg = 'Could Not Connect to Server';
  });
  </code></pre>
  
  <p>}</p>