Reputation: 526
I have successfully connected my GEAR 2 emulator with Galaxy Note 2 Device. And I am creating an Integrated Gear 2 Application, Every thing 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.
Upvotes: 3
Views: 540
Reputation: 351
As a note, the Gear 2 and Gear 2 neo are UNABLE to make any form of direct internet calls even if paired with a host device via bluetooth. All internet requests must be made by a connected integrated hostapp which can relay the results to the gear.
More on the architecture of Gear 2 projects can be found here http://denvycom.com/blog/step-by-step-guide-to-build-your-first-samsung-gear2-app-tizen/
However, the Gear S with its wifi, 3g and 4g support will support direct internet access. You will need to decide if you want to target one or both devices.
Upvotes: 0
Reputation: 490
A better way to do this is to send the data needed to make the request to your integrated android app. Then from there you can make ajax call to the web or whatever. The Gear2 has no wifi capabilities on its own. It relies on android.
Upvotes: 2