Is chrome.alarms API reset after a new extension version is released? - google-chrome

Was looking at the chrome alarms API which can be used to schedule periodic calls in the chrome extension.
This is useful for MV3 migration as the new service worker is no longer persistent like the background page.
What I would like to know is whether chrome.alarms will continue to be active even after a new version is pushed to the chrome webstore and has been downloaded to the user's machine? Or will it be reset when a version updates.

Related

Is there a way to overwrite local files in Google Chrome with service worker running?

Just found that if you have a service worker in your app and you use local overwrite in Chrome dev tools, the view shows a new file but it executes the old file, so you can't use the debugger properly. But anyway it doesn't work at all the file is not updated.
My service worker is only to allow using files in memory (from indexedDB) and the rest of the files just use fetch in Worker (no cache).
I was also trying to use extension resource overwrite but it also doesn't work.
Does anyone know how to change the file locally without modifying an app where the service worker is running?
I'm not sure If I should report this to the Chrome Dev tools team, since this is like a bug or missing an important feature.Just found that if you have a service worker in your app and you use local overwrite in Chrome dev tools, the view shows a new file but it executes the old file, so you can't use the debugger properly. But anyway it doesn't work at all the file is not updated.
My service worker is only to allow using files in memory (from indexedDB) and the rest of the files just use fetch in Worker (no cache).
I was also trying to use extension resource overwrite but it also doesn't work.
Does anyone know how to change the file locally without modifying an app where the service worker is running?
I'm not sure If I should report this to the Chrome Dev tools team, since this is like a bug or missing an important feature.

Chrome extension not syncing

I wrote a google chrome extension which should sync data to my chrome profile to all of my computers.
Therefore i'm using the chrome storage api: Google Chrome Storage
I'm able to store and read the data on my primary pc. But on my other computer the data is not accessible.
I'm using the same profile on both computers. And i'm using the chrome.storeage.sync methods.
Because i don't want to publish the extension now i installed the extension with the developer mode activated and not over the chrome store.
Is this the reason why the data is not syncing?
Ok, i now published my app to the chrome store and now it's syncing.
So syncing is not working while your extension is under development.

Chrome App using sockets api run without opening Chrome window

I want to build a Chrome App to listen notifications sent by my Lab, and I don't want to open a Chrome window(just let the app run in background silently, and pop a box when I have a new message). But sockets api is only for packaged app, and packaged app has no background permission, what should I do? Thx.
(Quick answer, will edit later with more info.)
Chrome Packaged Apps don't need that permission, they have a background page by default. Most (say, 99% of existing) chrome apps will open a window when they launch, but thats optional.
If your app has an open window, the runtime will keep your application running an not move into an idle state. However, if you are using certain APIs, such as having an open TCP server socket listening for incoming connections, its very unlikely that the runtime will shut your app down unless the system is under serious constraints.

Is there a way to show desktop notifications even if Chrome closed?

I'm developing a Google Chrome Extenstion, I wonder if there is anyway to show desktop notifications even if Chrome is closed, maybe some sort of background process or service? Kindly advice and guide me if it is not possible also. Thanks.
If you request a "background" permission your extension's background page will be able to show notifications even with Chrome windows closed.
When any installed hosted app, packaged app, or extension has "background" permission, Chrome runs (invisibly) as soon as the user logs into their computer—before the user launches Chrome. The "background" permission also makes Chrome continue running (even after its last window is closed) until the user explicitly quits Chrome.
If you use Google Chrome, you can enable a new Gmail feature that shows desktop notifications for new messages. Go to "Settings", and enable chat notifications and mail notifications to see a small bubble when you get a new message.
Secondly: Using WCF or Windows Services:
you have to develop simple client on machine polling a central service for alerts. Each alert should have a unique id so each client can deal with idem-potency
I Hope that this will be helpfull to you
Regards: Azeem Raavi

How to get google drive apps on multiple accounts

I'm running into what seems to be a serious usability problem for users trying to use a Google Drive app from more than one account. In order for an app to be able to use Drive APIs on a user's behalf, the user must install the associated Chrome Web Store app while logged in as that user. The problem is that the Chrome Web Store seems to look for an app being installed per browser, whereas the Drive API needs the app to be installed per user.
As far as I can tell, the only way to install the same app for multiple users in the same (Chrome) browser is to install with one user, then log in as the second user, uninstall the app (which the CWS says is already installed), and then reinstall it (so that Drive will mark the app as installed for the second user). This is a very confusing experience, because during this process the app and the CWS are sending the user mixed messages about whether the app is installed.
I'm not sure if there's a canonical app to test for system bugs like this. Is DrEdit live somewhere? But if you want to see the problem behavior in our implementation, install the Graphing Calculator by Desmos.com as one user, launch it and log in using google drive and verify that everything is working. Then log out from the app, and use https://accounts.google.com to log in to google as a different user, and try using the app again. The app will tell you that it isn't installed (that's what Drive's APIs are telling us) and direct you to the CWS, which claims that the app is installed.
We are aware of the issue. And I agree this is a really bad experience for users using the same Browser (and the same Chrome session). One of the issue is that the account you are logged-into chrome can be different than the account you are logged into Google Web (Gmail, Chrome Web Store, Drive etc...) Therefore the Chrome Web Store has to make a choice to either use the apps's install status on the Browser or the Web Google account.
If you write an FAQ for your users maybe you can suggest that the most effective way to install the app for the second user is to simply install it using another browser like Firefox. Especially since Firefox won't be impacted by this issue because the app doesn't get installed on Firefox, only on the Drive account :)
The bug is filed internally, now we can only wait for it to be prioritized and fixed/sorted-out. We are also working on some other way for apps to have an install flow that doesn't involve the Chrome Web Store so that it will be less impacted by all of he Chrome Web Store/Chrome browser intricacies.
I'll make sure to ping our eng team on that issue again.