Need Help: HowTo start to programm a first app: "Pause" (break or "face down") for Xperia 10 III

Ok, I tried only some simple things with Situations, but wasn’t sure, that everything would be available. First I try harder with Situations before starting a new app.
@Dima2387 : Thanks for the links, SDK is installing.

Hi perjung,
thanks for your hints. I discoverd more items in the menu “functions”.
Now I’ve testet the following, see screenshot.
First problems:

  • Still looking at the opened app Situation: I got the message “current Situation: Pause”
    → this “Pause”-Situation should only be activated, if I lay the phone “face down” on a table or so.
    → Although it was shown activated, the “what’s” (german: was) are not done: no vibration discovered, no don’t disturb activated, no wifi deactivated
  • In the menu > “i”, I tap on “Sonar install”, nothing happens (external source are activated)

depending on the version of sfos you are running you might run into sailjail issues with situations.
there is a thread about it, basically it says you should modify .desktop file of situations to exclude it and then people claim situation would work as expected.

1 Like

Instead of Aus, try with Started. It doesn’t sound logic, but you want to start something when the proximity sensor is seeing something.

Hi, I just managed to get most of the wanted behaviour:
Wifi is disabled, I can see it on the router. The other items reduce battery discharge, too.

One thing I’m missing at the moment:
I’d like to have a short confirmation, that the Situation “Pause” is activated. Does anyone know a direct console-command for: either a short vibration or a sound (SMS, e-mail, …)?

It’s possible to enable notifications. Situations->Settings->Notifications.

1 Like

I just realized that. The last thing I added was the “energy saving mode”. Now if I turn the phone “face down”, starting the energy saving mode confirms with a sound, nice.
(EDIT: Done with sailfish 4.0.0.64, sonar had to be installed from github.)

I’m sorry to ask again: Today I deleted one of the “default situations” (at home). After a reboot of the Phone, I got an error. No tap on either button did anything.

I deleted Situations from the phone and reinstalled it → got the same failure.
Does someone has experience with such a failure?

Does someone know where the config-files of Situations are? Perhaps I could delete them all by ssh and reinstall it again.

With the help of Heikki Haveri, Pastilli Labs, I could reinstall it completly:

devel-su
[root@Xperia10III defaultuser]# pkcon remove situations
[root@Xperia10III defaultuser]# rm -r .local/share/harbour-situations2application/
rm: descend into directory '.local/share/harbour-situations2application'? y
rm: remove directory '.local/share/harbour-situations2application'? y
[root@Xperia10III defaultuser]# pkcon remove situations-sonar

Restart the phone.
Reinstall ‘Situations’ and ’ situations-sonar-0.0.9-9.aarch64.rpm’ (from github).

This time I deactivated the default situations, before I organized my personal “Pause”.

New try with 4.4.0.72:

  1. installation of situations (+add function: “display”)
  2. installation situations-sonar-0.0.9-9.aarch64.rpm (from github)
  3. configuration of Situation “display down” as desired, see picture:

Aim:
a) Save battery:
While the phone is worn in the trousers or laid down on the display → WiFi should be disabled.
b) Get notifications only when I actively check the phone.

Observations:

  1. First morning, the WiFi was disabled correctly, as seen on the router or by the messages of Situations.
  2. Problem: Some hours later, Situations disabled WiFi, although the display was “on”, when I came near to the proximity sensor (e.g. when tapping on a top corner in an app).

To solve this, I restarted the phone once. Now I got the same (white failure screen as mentioned on 5th of july)

If Situations works like configured, it would spare a certain amount of battery.
Can someone confirm this behaviour? How could I get Situations to work properly?

Hello,
it seems that “situations” app is not compatible with Sailjail. Do you start it from the launcher or from a terminal?
You can try to start it from the terminal (thus avoiding Sailjail restrictions) and see if the behaviour is the same.

1 Like

How can I start “situations” from the terminal?
If I tab “sit” in terminal, I got only “situations-sonar”.

harbour-situations2application

Ok, that’s my output now:

[defaultuser@Xperia10III ~]$ harbour-situations2application
[D] unknown:0 - Using Wayland-EGL
library “libGLESv2_adreno.so” not found
library “eglSubDriverAndroid.so” not found
library “vendor.qti.qspmhal@1.0.so” not found
QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: Datei oder Verzeichnis nicht gefunden
Created symlink /home/defaultuser/.config/systemd/user/user-session.target.wants/harbour-situations2application.service → /usr/lib/systemd/user/harbour-situations2application.service.
[W] unknown:8 - qrc:/qml/application/Background.qml:8:37: Unable to assign [undefined] to bool

Thank you for the hint. At the moment, Situations works well: The proximity sensor shows no malfunction and the app didn’t hang up.
I’ll observe some days.
Perhaps I’ll start Situations after a reboot per terminal per hand, using “arrow up” for recent commands; or I could add an entry in crontab (which I have not tested yet).

Why not to use systemd timers?

Further problems:

  • Situations worked for 2 days as desired.
  • Today -again- the sensor reacted, although the display was “on” → the display /WiFi is deactivated for a short moment each time, I come near the sensor.
  • I uninstalled the app graphically.
  • Nevertheless, the deactivation still went on, i.e. some task was still running.
  • For documentation, I made a picture of the output of “top”
  • Now, several hours later, the deactivation stopped (I didn’t anything more).

FYI, I didn’t reboot the phone the last days, nor did I install something else.
In the end it doesn’t work for me and I can’t understand, what’s the cause. I’m disappointed, because I thought it would be a good approach to save some battery power over the day.

Can you check:

systemctl --user status harbour-situations2application

and

devel-su systemctl status situations-sonar

[defaultuser@Xperia10III ~]$     systemctl --user status harbour-situations2application
● harbour-situations2application.service - Situations Background Service
   Loaded: loaded (/usr/lib/systemd/user/harbour-situations2application.service;
 enabled; vendor preset: enabled)
   Active: inactive (dead) since Mon 2022-10-10 10:39:44 CEST; 8h ago
  Process: 17085 ExecStart=/usr/bin/harbour-situations2application server (code=
exited, status=0/SUCCESS)
 Main PID: 17085 (code=exited, status=0/SUCCESS)
[defaultuser@Xperia10III ~]$     devel-su systemctl status situations-sonar
Password: 
● situations-sonar.service - Situations Companion Service
   Loaded: loaded (/etc/systemd/system/situations-sonar.service; enabled; vendor
 preset: enabled)
   Active: active (running) since Fri 2022-10-07 20:36:09 CEST; 2 day
s ago
 Main PID: 3248 (situations-sona)
   Memory: 6.9M
   CGroup: /system.slice/situations-sonar.service
           └─3248 /usr/bin/situations-sonar

Warning: Journal has been rotated since unit was started. Log output is incomple
te or unavailable.