# Android app start triggers

This page is mostly based on [DrYak's explanations](https://forum.sailfishos.org/t/android-layers-on-jolla-c2/20029/16) on the forum.

## Autostart when 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.

## [](https://forum.sailfishos.org/t/android-layers-on-jolla-c2/20029/16#notifications-2)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*â€&#157; button in the Appâ€™s settings, or thereâ€™s a patch called â€œ*Launcher icon for android settings*â€&#157; in the Patchmanager Webcatalog)

Either:  
click *Settings* app â†’ switch to *Apps* tab â†’ select the app â†’ click the â€œ*Open Android Settings*â€&#157; 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 &amp; 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.

## [](https://forum.sailfishos.org/t/android-layers-on-jolla-c2/20029/16#google-cloud-messaging-push-notifications-3)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â€&#157; 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).

## [](https://forum.sailfishos.org/t/android-layers-on-jolla-c2/20029/16#share-suggestions-4)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).