When my extension runs for the first time, I want to register the installation with my server. However, I only want the registration to occur the first time the extension is run after installation. How can I achieve this in by background scope? Currently, my code looks like this:
appAPI.ready(function($) {
appAPI.request.get({
url: 'http://myserver.com?action=install&id='+appAPI.appInfo.id,
onSuccess: function(res) {
console.log('Registration complete');
}
});
});
The problem with the code above is that the registrations happens every time I open by browser. Please help!