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

event call back before an app was terminated by user

ANSWERED

Do we have an event call back before an app was terminated by user?

for status saving and cleanup jobs

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Sure.

 

import { me } from "appbit";

// register for the unload event
me.onunload = () => {
    console.log("We're about to exit");
}

https://dev.fitbit.com/reference/device-api/appbit/

View best answer in original post

Best Answer
0 Votes
3 REPLIES 3

Sure.

 

import { me } from "appbit";

// register for the unload event
me.onunload = () => {
    console.log("We're about to exit");
}

https://dev.fitbit.com/reference/device-api/appbit/

Best Answer
0 Votes

Thank you!

Best Answer
0 Votes

What is necessary to stop the App ending in me.unload(), if you want to add an "Are you sure?", or is it too late?

Author | ch, passion for improvement.

Best Answer
0 Votes