06-21-2019 00:40
06-21-2019 00:40
Hi,
I am performing a file transfer on Ionic. Two question
1. Once a file has been queued in outbox, how to often is the file scheduled to send the file to the companion app ?
2. How many files can the watch queue in the outbox?
Thank you,
Parag
06-21-2019 10:37
06-21-2019 10:37
The system tries to deliver your file as quickly as possible, but it can be delayed by other traffic, such as syncing with our backend.
I'm not sure about an upper limit for the file queue, but you are limited to 15mb total storage on the device, including your application code and resources.
06-23-2019 08:35
06-23-2019 08:35
Thanks for quick reply Jon. Here are my findings.
1. The companion App will Sync every 10 min.
with "Wake the Companion after X minutes
06-26-2019 06:55
06-26-2019 06:55
File transfer to the device isn't dependent upon the companion running. Once you queue your files, the mobile app takes care of the transfer.
07-02-2019 08:25
07-02-2019 08:25
Hi Jon,
Seems that once files are queued on the outbox I don't see any files received on the mobile app end. Well, it is quite inconsistent on transfer. My observation sometimes files is sent within minutes and sometimes the files are stuck on the watch forever. I am not able to identify a pattern.
Side note: The phone is near the watch always.
Any suggestion, how to tackle this problem. Thank you,
Kind regards,
Parag
07-04-2019 14:29
07-04-2019 14:29
Is the mobile app up to date? Android or iOS? Are you using a unique filename for each transfer?
07-04-2019 16:39
07-04-2019 16:39
The mobile app is updated. It is Android app.
Yes, each file is unique. I can see all the unique files that are queued in the console.
I also realize the file transfer totally stopped working after the mobile app update. It might just be a coincidence.
07-05-2019 10:06
07-05-2019 10:06
If you reboot the phone and Fitbit device, does the transfer start working? Is the Fitbit data sync working ok?
07-05-2019 22:18 - edited 07-05-2019 22:22
07-05-2019 22:18 - edited 07-05-2019 22:22
I've seen this behaviour. I tried clearing the queue but the API for that was broken at the time.
IIRC, deleting the Fitbit app's data (Android) might have got the file transfers going again (with the obvious exception of whatever was in the queue previously). Or stopping and restarting the Fitbit app might have done it. Nevertheless, they would be things you could try, and which might help to indicate where the problem lies.
Same issue as here, I think.
07-05-2019 22:22
07-05-2019 22:22
I have tried rebooting and also a factory reset. But the same behavior.
The fitbit data sync seems to be working fine.
07-05-2019 22:29 - edited 07-05-2019 22:33
07-05-2019 22:29 - edited 07-05-2019 22:33
Thanks for the reply Catplace,
Before the most recent app release file transfer was inconsistent, but file used to get transferred sometime.
Now it has totally stopped. Reinstalling the app, performing a clean install or even doing a factory reset does not help.
07-05-2019 22:51
07-05-2019 22:51
One more finding:
I am able to transfer a file from the companion app to the device consistently.
@parag_kudtarkar wrote:Thanks for the reply Catplace,
Before the most recent app release file transfer was inconsistent, but file used to get transferred sometime.
Now it has totally stopped. Reinstalling the app, performing a clean install or even doing a factory reset does not help.
07-06-2019 00:29
07-06-2019 00:29
Hi,
I have created a test app to send file
https://github.com/wirefree/Fitbit_File_Transfer/tree/master/TestTransfer-export.
Do let me know if I am doing anything wrong. Thank you,
Parag
07-29-2019 17:03
07-29-2019 17:03
I did some testing here and was able to receive your files. I did make some small changes for testing purposes.
//app/index.js
import document from "document"; import * as fs from "fs"; import { outbox } from "file-transfer"; let statusText = document.getElementById("status"); statusText.text = "Waiting..."; let fd = null; function createFile() { let filename; let stringDateTime = new Date().getTime(); stringDateTime = stringDateTime.toString().substring(6,12); filename = "dt" + stringDateTime; console.log("Create Filename:" + filename); fd = fs.openSync(filename, "a+"); let i = 0; while(i<10) { let stringDateTime = new Date().getTime(); stringDateTime = stringDateTime.toString().substring(6,12); console.log(stringDateTime) let buffer = new ArrayBuffer(4); let newUint = new Uint32Array(buffer); newUint[0] = stringDateTime; fs.writeSync(fd, buffer); i++; } fs.closeSync(fd); fd = null; sendFileOutbox(filename); } createFile(); async function sendFileOutbox(filename){ console.log("Start sending"); outbox .enqueueFile(filename) .then((ft) => { console.log("File " + filename + " successfully queued."); }) .catch((error) => { console.log(`Failed to schedule transfer: ${error}`); }) ft.unlinkSync(ft.name); console.log("Successful delete"); createFile(); }
//companion/index.js
import { inbox } from "file-transfer"; async function processAllFiles() { let file; while ((file = await inbox.pop())) { const payload = await file.arrayBuffer(); const typedArray = new Uint32Array(payload); const array = Array.from(typedArray) array.forEach((item) => { console.log(`item: ${item}`) }) } } inbox.addEventListener("newfile", processAllFiles); processAllFiles();
02-13-2020 01:48
02-13-2020 01:48
Dear all,
I would like to reopen the file transfer issue.
Fitbit clockface file transfer setting.
Logic:
1. Create new file. Maximum files that can be created are 80.
2. Fill the file till filesize 200 kb.
3. Send file to fitbit outbox. Maximum number of files that can be put in outbox queue are 15.
4. Follow step 1.
(Assumption here is Ionic OS will take care of sending file from outbox to phone) .
Observation: Files transfer works fine on an initial install. It does a great job in sending the file to the phone.
Failure point: Once the device outbox-queue max out and local file max out, no data is transferred to the phone. The only solution is reinstall the clockface.
Please guide me on the how should we address this issue. Below are few other questions from my previous post.
1. Once a file has been queued in outbox, how often is the file scheduled to send the file to the companion app ?
2. How many files can the watch queue in the outbox?
Looking forward for a quick response. thank you,
Kind regards,
Parag Kudtarkar
02-13-2020 21:58
02-13-2020 21:58
Another observation is, When bluetooth get disconnected(e.g. if the watch gets away from phone) then gets connected again . The file transfer does not get initiated even if there are files in the outbox.
04-24-2021 02:29
04-24-2021 02:29
What is the way around this then?