issue in making web api call in Gear 2 app running on Gear 2 Emulator connected with Host Android Device

issue in making web api call in Gear 2 app running on Gear 2 Emulator connected with Host Android Device

BY 29 May 2014 Web Application Development

I have successfully connected my GEAR 2 emulator with Galaxy Note 2 Device. And I am creating an Integrated Gear 2 Application, Everything works fine including the JQuery functionality. But I am unable to make Web api calls from the Gear 2 Emulator using the Host Device Internet connection. Following is my code to make Json call:

$.ajax({
                  type: “GET”,
                  url: uri,
                  beforeSend: function () {console.log(“before sending”);},
                  dataType:’jsonp’,
                  success: function (data) {console.log(“success”); console.log(data);},

                  error: function (ex) {console.log(ex);

         });

The problem is Except for the above mentioned code portion, everything gets executed and this code just gets skipped. Any help would be appreciated.

Written by