Android app: detecting it's running on Sailfish

Hi,

I’m using the Android app Conversation (XMPP) client on Sailfish and it seems Call Integration is buggy in SailfishOS’s compat layer and makes calls have no sound.

It’s something that even some Android distributors fail to implement correctly, and there’s in the code a function to disable Call Integration if needed… The question is : do anybody know what kind of test (in java) I could use to check whether the app is actually running on SailfishOS? Various Build.* variables do not have anything…

1 Like

As SailfishOS is outside of the LXC container AAS (ex-AlienDalvik) runs in, that might (and should) be not possible (but may; still, on first sight I think this is the wrong approach).

IMO the correct question is: Is there a way for an Android app to distinguish between running on AAS (ex-AlienDalvik) versus AOSP-derivates (LineageOS etc.)?

Yes, I guess given how this can turn against the user (apps declaring they don’t like non-official images), it might not be easy.

If it’s running in a LXC container, no luck trying to look in /etc/sailfish-release then, or even trying to find some environment variable.

I was hoping some Build property would help, but I can’t even find an app to dump them.

In recent versions, the device name (in “About”) seems to have changed from “Device (AOSP)” to “Device (AppSupport)”.
Maybe that can be used.

2 Likes

Yes, I finally managed to dump every properties in the app and saw and proposed a patch based on this, and the app dev/maintainer seems to be OK with this approach.

Not sure many people use the app on SailfishOS, but that’d allow to use its call feature again!

1 Like

Where is this setting, please? Can’t find it.

  1. Open Android Settings (e.g. by going into Sailfish Settings → AppSupport → tap on the version a couple of times
  2. scroll to the last entry in the Android Settings app, “About Device”
  3. look a the “Device” section
2 Likes