Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

System Memory Info closes App

Hi,

My app immediately closes when trying to do the following:

import { memory } from "system";
console.log("memory "+memory.js.used+"/"+memory.js.total);

It's a copy of the example given here: https://dev.fitbit.com/build/reference/device-api/system/

 

My console output:

[11:00:38 AM]Sideload successful!
[10:18:34 AM]Loaded and evaluated: file:///android_asset/bootstrap.js
[11:00:41 AM]App Started
[10:18:34 AM]Loaded and evaluated: file:///data/user/0/com.fitbit.FitbitMobile/app_companions/dbf77543-e231-422a-a051-59d9ce1bb19c/0x09e30bc8b9df66eb/companion.js
[10:18:34 AM]Companion launched by [launchedOnTracker]
[10:18:36 AM]Companion Socket Opened
[10:18:39 AM]App closed on device, unloading companion in 3 seconds…
[10:18:43 AM]Unloading companion…
[10:18:45 AM]Companion unloaded

Is the JS memory function deprecated?

Best Answer
0 Votes
1 REPLY 1

The API is still valid.

The timestamps on those log entries look weird though.

How long does the app run for before it terminates?

Best Answer
0 Votes