Android AppSupport

Information on the Android AppSupport in Sailfish OS.

General information can be found in the official documentation at https://docs.sailfishos.org/Support/Help_Articles/Android_App_Support/ 

Android Layers in Sailfish OS

This page is mostly based on DrYak's explanations in the forum.

Sailfish OS can be seen in multiple layers of software: 

To run native applications, no Android is required.

To run Android apps

A big difference between a stock Android OS, and Android App Support is that you get more options to control what is running in the phone (even more if you opt to use microG instead of Google’s own shit).
e.g.:

Also:

On smartphones not officially supported by Jolla, there is the open-source Waydroid solution, which is pretty similar to Android App Support.

So TL;DR: You get a whole range of options between:

Android app start triggers

This page is mostly based on DrYak's explanations 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.

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:

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).

microG installation (Google Play simulation)

Please refer to  Installing microG on Sailfish OS in the forum.

Migrating Android app data


Migrating Android app data

Transfer Signal using Signal-native Backup and Restore

The best source to install Signal is always direct from the website https://signal.org/android/apk/#target 

Export on the old phone

Open the Signal app and go to the settings. Navigate to Chats and then Backups (at the bottom). If they are disabled, turn them on.

signal-export-5-location.png

signal-export-6-choose.png

signal-export-7-passphrase.png

Note down the passphrase, you'll need it for the restoration!

Data transfer

Import on the new phone

Starting Signal the first time, it asks you if you want to set it up newly or restore from a backup.

On the next screen you will be asked if to restore from another device or from a file. Chose the latter:

signal-restore-1-choose.png

On the next screen click the button "Choose backup":

signal-export-6-choose.png

This opens the native Android file chooser. With the button top left you can switch between internal storage and memory card.

signal-restore-3-open.png

Choose your backup file.

The next screen will show you a few meta information on the file (age, size):

signal-restore-4-confirm.png

Tapping on "Restore backup" will ask you for the passphrase:

signal-restore-5-passphrase.png

Now, the restoration is in progress:

signal-restore-6-progress.png

Guide to be continued.....

Migrating Android app data

Transfer WhatsAppusing native backup and restore

See https://faq.whatsapp.com/618575946635920/?locale=en_US&cms_platform=android

The backups are stored in android_storage/Whatsapp

Migrating Android app data

Transfer Threema/ThreemaLibre data with native backups

Either Cloud backup or local backup

Cloud Backup: Chats included?