Situations app share and searching work arounds for special functions

Hello, I want to ask about two missing work arounds in the situations app.
I solved the following work arounds which not work before but two I can’t solve alone. The first 4 work arounds I will share also here:

  1. Play a sound for every Profile with command line - solved
    paplay /home/defaultuser/Music/Situation/xxxx.wav

  2. switch ON/OFF mobile service per command because the official function in situations work not longer – solved
    sudo dbus-send --print-reply --type=method_call --system --dest=net.connman /net/connman/technology/cellular net.connman.Technology.SetProperty string:Powered variant:boolean:false
    sudo dbus-send --print-reply --type=method_call --system --dest=net.connman /net/connman/technology/cellular net.connman.Technology.SetProperty string:Powered variant:boolean:true

  3. switch ON/OFF aliendalvik service in the night per command line – solved
    sudo /usr/systemctl stop aliendalvik.service
    sudo /usr/systemctl start aliendalvik.service

  • new file under
    /etc/sudoers.d/my-personal-settings
  • add follow line:
    %defaultuser ALL=(ALL) NOPASSWD: ALL
    or only
    defaultuser ALL=(ALL) NOPASSWD: /usr/bin/systemctl
    defaultuser ALL=(ALL) NOPASSWD: /usr/bin/klillall
    etc.
  1. switch ON/OFF GPS with command line – solved
    install gpstoggle from OpenRepos.net
    gpstoggle location=1
    gpstoggle location=0

  2. kill or close an android app and also the open app cover from it – no solution
    I try:
    sudo killall de.blitzer.plus but android restart this process again and the app cover will not close
    What can I use to close an app like the button in settings or the close “X” in switcher?
    I was searching also in some lipstick files and found this line:
    apkConfiguration.call("forceStopApp", ["de.blitzer.plus"]
    But I dont know how can I use this! A restart from aliendalvik works but this is not a good solution If I use another navigation app and make a stop on the trip.

  3. Disconnect my Amazfit GTS in car mode separate with command and not switch off hole Bluetooth – no solution
    Why I need this? Because the connection to a watch will kill the dealer functions from the car and I can’t take a call without the phone touch display. The microphone and the speakers work but the wheel switches do not work. If I disconnect the watch in settings, I can use all cell functions.
    Now I need a command to switch off a special BT-device maybe at the MAC address…
    The BT device had the name “Amazfit GTS” with MAC-adress: “D1:6C:9F:4F:9B:9C”.

Maybe here are specialists with more knowledge as me. Thanks for all ideas!!!

5 Likes

I would try to perform this command maybe before or after the Car-audio is connected:

systemctl restart --user mpris-proxy
1 Like

@fingus Thanks for your help! I have tested it but this not disconnect the watch :frowning:

I will search another way and share it if I found the command.

Here I found/share now the solution for the BT watch :slight_smile:
https://forum.sailfishos.org/t/broken-pairing-no-connection-with-bluetooth-car-kit-10-iii-4-4-0-68/12366/10

  1. I install a special BT package with:
    pkcon install bluez5-tools
  2. with root or sudo I can use follow comannd lines:
    sudo bluetoothctl connect D1:6C:9F:4F:9B:9C
    sudo bluetoothctl disconnect D1:6C:9F:4F:9B:9C
  3. I am happy, now only the problem how can I close an open app complete with app cover is open!

1 Like

The mpris-restart should not disconnect your watch but enabled the remote on your steering-wheel.

Normally there is no need to disconnect the watch in order for a working mpris-remote.

I had a Amazfit BIP and experienced the same problems like you. Sometimes the remote from watch and car-steering working, sometimes only one or nothing.

Having said that i had also Problems with Android and Bluetooth regarding Title-Transfer and Remote on Car-Audio.

Actually i use Jolla C2 and things seem to be improved, not perfect but better than what i experienced before.

3 Likes

Okay, this I will try tomorrow in my car, but the problem is, that I switch in car profil if situations see the connection with my mazda and I dont know what it makes if I start then your line. But maybe I can run this code one time in the morning or in every other profile. I will see and share the result for other users here. Thanks for your good tips!!!

2 Likes

To the close app problem I had a new idea.
I open the android .desktop file from Blitzer de and found this:

[Desktop Entry]
Exec=apkd-launcher -d %U de.blitzer.plus.apk de.blitzer.plus/com.eifrig.blitzerde.activity.splash.SplashActivity
Icon=/home/defaultuser/.local/share/apkd-bridge/launcherIcon/apkd_handler_de_blitzer_plus-com_eifrig_blitzerde_activity_splash_SplashActivity.png
MimeType=x-scheme-handler/atudo;x-scheme-handler/blitzerde;x-scheme-handler/geo
Name=Blitzer.de PRO
NoDisplay=true
StartupWMClass=de.blitzer.plus
Type=Application
Version=1.0
X-Nemo-Application-Type=no-invoker
X-apkd-apkfile=/home/.android/data/app/de.blitzer.plus.apk
X-apkd-className=com.eifrig.blitzerde.activity.splash.SplashActivity
X-apkd-packageName=de.blitzer.plus
X-apkd-packageVersion=4.3.11

Maybe I can add after Exec= another exit command.
If I use the line
apkd-launcher -d %U de.blitzer.plus.apk de.blitzer.plus/com.eifrig.blitzerde.activity.splash.SplashActivity
in terminal with sudo I get follow answer:

[defaultuser@Xperia10II-DualSIM ~]$ sudo apkd-launcher -d %U de.blitzer.plus.apk de.blitzer.plus/com.eifrig.blitzerde.activity.splash.SplashActivity
Launching Android Intent android.intent.action.VIEW de.blitzer.plus/com.eifrig.blitzerde.activity.splash.SplashActivity with %U/(null)
Failed to get bus access - 0 : Cannot autolaunch D-Bus without X11 $DISPLAY
Failed to get bus access - 0 : Cannot autolaunch D-Bus without X11 $DISPLAY
[defaultuser@Xperia10II-DualSIM ~]$

I did some quick tests with your “close app problem” and usually just killing the process of an android app should be enough. But de.blitzer seems to be different and re-spawns…

Finally I was successful with devel-su appsupport-attach am force-stop de.blitzer - in your case probably devel-su appsupport-attach am force-stop de.blitzer.plus

3 Likes

Hello, I tested it with

sudo appsupport-attach am force-stop de.blitzer.plus

and it’s run perfect!!!
Many Thanks - you are a specialist and I am so happy. Now I can start and stop any android app with Situations. Nice weekend and I will also test the Line

systemctl restart --user mpris-proxy its run only without sudo

from fingus today to solve the conflict between a conneted Amazfit watch and the car bluetooth.
Then all my open points are solved with the help from this wonderful forum.
After this I will share it also with the developer from Situations (Pastilli Labs) because he can all lines maybe bring in his helpfile in the app.

4 Likes

systemctl restart --user mpris-proxy

Works also perfect and I start it after the connection with the car.
This is only possible because I use the function BT detection special device in Situations. This search at may car and it is connected than switch on the profile car.
Now I had no open points.
Thank you all helpers and good reuse the other users.

3 Likes