parent
1c2ca29f3f
commit
cf1f2119cc
|
|
@ -1,14 +1,14 @@
|
|||
# A-GPS Data
|
||||
|
||||
Load assisted GPS (AGPS) data directly to the watch using the new http requests on Android GadgetBridge.
|
||||
Load assisted GPS (A-GPS) data directly to your Bangle.js using the new http requests on Android GadgetBridge.
|
||||
|
||||
Will download AGPS data in background (if enabled in settings).
|
||||
Will download A-GPS data in background (if enabled in settings).
|
||||
|
||||
Make sure:
|
||||
* your GadgetBridge version supports http requests
|
||||
* turn on internet access in GadgetBridge settings
|
||||
|
||||
Currently proof of concept on Bangle2 only.
|
||||
Currently proof of concept on Bangle.js 2 only.
|
||||
|
||||
## Creator
|
||||
[@pidajo](https://github.com/pidajo)
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@ function display(text1, text2) {
|
|||
if (img) {
|
||||
g.drawImage(img, g.getWidth() - 48, g.getHeight() - 48 - 24);
|
||||
}
|
||||
g.setFont("Vector", 20);
|
||||
g.setFont("Vector", 18);
|
||||
g.setFontAlign(0, 1);
|
||||
g.drawString(text1, g.getWidth() / 2, g.getHeight() / 3 + 24);
|
||||
if (text2 != undefined) {
|
||||
g.setFont("Vector", 15);
|
||||
g.setFont("Vector", 12);
|
||||
g.setFontAlign(-1, -1);
|
||||
g.drawString(text2, 5, g.getHeight() / 3 + 29);
|
||||
}
|
||||
|
|
@ -22,15 +22,14 @@ Bangle.loadWidgets();
|
|||
Bangle.drawWidgets();
|
||||
|
||||
function start() {
|
||||
display("Updating data...");
|
||||
require("agpsdata")
|
||||
.pull(function() { display("Success", "AGPS data updated."); },
|
||||
function(error) {
|
||||
display("Error:" + error, "touch to retry");
|
||||
Bangle.on("touch", () => {
|
||||
start();
|
||||
});
|
||||
});
|
||||
display("Updating A-GPS...");
|
||||
require("agpsdata").pull(function() {
|
||||
display("A-GPS updated.", "touch to close");
|
||||
Bangle.on("touch", () => { load(); });
|
||||
},
|
||||
function(error) {
|
||||
display("Error:" + error, "touch to retry");
|
||||
Bangle.on("touch", () => { start(); });
|
||||
});
|
||||
}
|
||||
|
||||
start();
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
{ "id": "agpsdata",
|
||||
"name": "A-GPS Data",
|
||||
"shortName":"AGPS Data",
|
||||
"shortName":"A-GPS Data",
|
||||
"icon": "agpsdata.png",
|
||||
"version":"0.02",
|
||||
"description": "Download assisted GPS (AGPS) data directly to watch",
|
||||
"description": "Download assisted GPS (A-GPS) data directly to your Bangle.js",
|
||||
"tags": "boot,tool,assisted,gps,agps,http",
|
||||
"allow_emulator":true,
|
||||
"supports": ["BANGLEJS2"],
|
||||
|
|
|
|||
Loading…
Reference in New Issue