Android app start triggers
This page is mostly based on DrYak's explanations on the forum.
Autostart when Androidâ„¢Android AppSupport starts
This is controlled with the Sailfish settings app.
Click Settings app → switch to Apps tab → select the app → use the " Allow application background service to start on bootup " checkbox (Needs to be off to prevent autostart).
This will prevent the app from autostarting whenever Android App Support is started.
Notifications
Apps can automatically start to show an alert pop-up (if you set some alarm clock thingy inside your app, e.g., a game reminding you that your crops are now ready to harvest or whatever). You need to access the Android settings to change that (either you can use the “Open Android Settings†button in the App’s settings, or there’s a patch called “Launcher icon for android settings†in the Patchmanager Webcatalog)
Either:
click Settings app → switch to Apps tab → select the app → click the “Open Android Settings†button
then from the App’s Android settings → click Notifications
in the notifications setting, tweak to your wishes.
Or:
click Android Settings app → select App & notifications → select Notifications → scroll to the section titled Recently sent
tweak to your wishes
This will prevent applications from autostarting a showing toaster alerts about in-game events, google maps showing alerts about traffic in your area, etc.
Google Cloud Messaging (push notifications)
Whenever an app receives a push notification from the network, the app can start to fetch that network message and act on it. (e.g.: somebody writes you a chat message, so Google’s cloud pings your phone to tell you that there’s a chat message waiting for you, WhatsApp auto-starts, receives the chat message, and displays it) (or: your bank wants you to click on their 2FA app to confirm a transaction, so Cloud pings your phone, the 2FA app starts, and you get the “Please confirm†pop-up). The purpose is to avoid every single app on your phone wasting battery by constantly probing their server for updates, instead everything is centralized through the push notification system.
This can only be controlled if you use microG, as far as I know the proprietary Google Play Service don’t let you configure that.
click microG settings app → select Cloud Messaging → select the app.
You can tweak 2 settings:
- Start app on push message: You can then select if the app is allowed to autostart to process alerts from the internet when they arrive, or if the alerts will wait until you manually start the app.
- Allow registration: If the app is even allowed to receive alerts from the internet.
If this function isn’t turned on (you didn’t even install microG), chat apps might not immediately get chat messages but only periodically when they directly contact their server, sometimes only when you bring the app into focus.(Usually I allow WhatsApp and the banking app, and kill everything else).
Share suggestions
Whenever you hit a Share button in an Android app, in addition to showing you a list of apps that can share that media type (e.g.: all chat apps can share JPEG photos) like when you click Share on SailfishOS, on Android some apps can auto start and generate a list of suggested share (e.g.: WhatsApp will suggest your top most frequently used contacts).
AliExpress’ shop absolutely loves this function and constantly autostarts whenever you hit an Android share button.
There's no known way to disable this except either using the SailfishOS share option (it doesn’t trigger autostart) or manually killing the autostarted application (e.g., in Crest).