My app only download data when is connected over wifi (not over phone/BT)
My app only download data when is connected over wifi (not over phone/BT)
BY 14 Mar 2018Web Application Development
Hello, I’m developing a Simplenote port for Tizen, that allows me to read Simplenote notes on my Gear S2.
I’m using Simperium.js to download notes from Simplenote, and this library use sockJS.js to work.
The application works great, and can download notes from Simplenote database… but only when Gear is connected via wifi.
If I disconnect gear from wifi and use my phone data plan (or phone wifi) using BT connection, the program is unable to download data. I’ve got another app that download data using a simple XMLHttpRequest sentence, and that program works well.
Something like
var xmlhttp = new XMLHttpRequest(),
datos,
XML_ADDRESS = “http://*********”,
XML_METHOD = “GET”;
xmlhttp.open(XML_METHOD, XML_ADDRESS, false);
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState === 4 && xmlhttp.status === 200) {
My app only download data when is connected over wifi (not over phone/BT)
Hello, I’m developing a Simplenote port for Tizen, that allows me to read Simplenote notes on my Gear S2.
I’m using Simperium.js to download notes from Simplenote, and this library use sockJS.js to work.
The application works great, and can download notes from Simplenote database… but only when Gear is connected via wifi.
If I disconnect gear from wifi and use my phone data plan (or phone wifi) using BT connection, the program is unable to download data. I’ve got another app that download data using a simple XMLHttpRequest sentence, and that program works well.
Something like
var xmlhttp = new XMLHttpRequest(),
datos,
XML_ADDRESS = “http://*********”,
XML_METHOD = “GET”;
xmlhttp.open(XML_METHOD, XML_ADDRESS, false);
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState === 4 && xmlhttp.status === 200) {
datos = xmlhttp.responseText;
document.getElementById(“tags”).innerHTML = datos;
xmlhttp = null;
} else {
console.log(“Error”); } };
xmlhttp.send();
But when I use this:
var api = new Simperium(‘chalk-bump-f49’, {token : ‘fffffff’});
var bucket = api.bucket(‘note’);
localStorage.clear();
bucket.on(‘notify’, function(id, object) {
BLABLABLA
Nothing works over BT. What I’m doing wrong? Any idea?
Thanks in advance.
BY
16 Apr 2025
Tizen Studio
BY
04 Nov 2024
Tizen Studio
BY
02 Apr 2024
Tizen Studio