Communicate with AppSupport (using Android Intents)

I’m looking for a way to exchange messages between a native Sailfish app and an app running inside AppSupport, ideally with two-way communication.

The goal is to use an Android app as a workaround for Bluetooth devices that don’t have native Sailfish support, while still interacting with a native Sailfish app (e.g. for notifications).

While looking into this, I came across Gadgetbridge’s Intent API, which seems like a promising starting point. However, I’m wondering whether it’s possible to use it across the AppSupport container boundary. Is there perhaps an (undocumented) D-Bus API for sending or receiving intents? Alternatively, is there a supported way to invoke shell scripts or other commands across the container boundary that could be used to bridge communication between the native and Android environments?

6 Likes

I guess you could use the Android am program to send intents.

appsupport-attach am ...
For me, Xperia 10 III, this takes root- so not very convenient for apps. I have a vague recollection that not all AAS run as root, but i could be wrong.

You will not be able to do command invocation in the other direction (out of the container) for obvious reasons.
Though i don’t know how the few things that are plumbed out of it are hooked up, but i’d be surprised if it was intents all the way to the outside of the container.

3 Likes

Thanks for the hint. I was able to send an intent from the terminal, and the Android app received it. This might already be enough for an initial proof of concept. It won’t be the most elegant solution, but it should work.

By registering an additional system service for that part, I should also be able to work around the root issue, even if it leaves a bit of a bad taste.

Let’s see how far I can get, or whether any other ideas come up.

2 Likes

For anyone who’s curious, here’s what I have so far:

It’s currently untested and therefore unreleased, as I lent out my development testing device…

1 Like

It’s done: RockBridge | OpenRepos.net — Community Repository System

3 Likes