Phosh app developer forum?

I have been writing some apps targeted for Linux and Android phones and I am finding Phosh to be a bit of a sore spot. I have been using Kivy and I have overcome several Phosh related issues, but I still have a couple I am scratching my head over.

Does anyone know of a Phosh app developer forum out there? Some place where I can read what other developers are seeing and possibly ask questions.

This is the closest thing to the forum I have been able to find and I fear it is too off topic.

Thanks for any insights.

5 Likes

Not sure, have you looked at the phosh official website? https://phosh.mobi/
They also have Gitlab: Phosh · GitLab

Matrix: https://matrix.to/#/#phosh:sigxcpu.org

GNOME GitLab linked on their main page: Home · Wiki · World / Phosh / phosh · GitLab

There is also a lot of info on their Mastadon page: Phosh (@phosh@fosstodon.org) - Fosstodon

Main site about page: About Phosh · Phosh

And some tutorial videos: Phosh Videos · Phosh

2 Likes

Sadly none of those sites are quite fitting my need. I was hoping to connect with other developers writing apps to run on Phosh.

For instance I have a 10K line Kivy program I wrote which I was getting ready to release to the public and a recent update to Phosh broke my call to the fullscreen method which I used to fix touch screen calibration issues that occur when Phosh windows my app by taking top and bottom screen real estate for the PhoshTopPanel and PhoshHome panels. The calibration is correct when the two panels are in auto-hide mode w/o inhibiting the ability to access the phones other features or apps so they panels need to be always visible.

Having a Phosh app developer forum I could post questions would be nice. But maybe such a forum does not exist. Sigh.

4 Likes

Maybe you can email the Phosh devs directly through the channel. I am not sure who at Purism heads the project…

1 Like

@admins can we get some clarification as to who is heading the Phosh project, and the possibility of a development forum?

1 Like

Did you find any Matrix channels that would be in line with this goal?

1 Like

The Matrix channel looks like it is for developing Phosh shell, not developing apps to run on Phosh. But maybe I am splitting hairs here as people who know the internals of the Phosh shell probably have the answers I seek. I will take a look at the forum and see what I can find.

Thanks for the advice!

4 Likes

@guido.gunther might be able to help

2 Likes

I never know who to ask on this stuff…

2 Likes

I honestly want to build shell extensions for Phosh, would be nice to have what one person tried (a hotspot toggle)

2 Likes

They have one built in newer versions of phosh

4 Likes

Would be cool to run a containerized userspace… Imagine if Flatpak was faster, you could package Phosh in a way to let the newest stuff exist on an older base…

1 Like

Yeah I really wish there is a way to do it currently on Byzantium other than developing it yourself

2 Likes

Imagine containerized userspace itself. Seperate from userspace applicatuons

1 Like

The calibration is correct when the two panels are in auto-hide mode w/o inhibiting the ability to access the phones other features or apps so they panels need to be always visible.

Maybe just put your app into fullscreen for that - from your description I’d say that’s what it is for. Why would one access other features while calibrating?

3 Likes

Phosh hooks into about all system services. It is one of the few things you don’t want to put into a container, phosh also wants new components of the base system like MM, NM, etc. Keeping the base sysstem recent is relatively easy.

3 Likes

Just copy, paste Build Your Own Quick-Setting or Lock-Screen Widget · Phosh (but we have a hotspot toggle since some time)

3 Likes

Actually that is what I am doing. The app opens up in fullscreen mode by calling the Window.fullscreen() method at the start of the app. The top and bottom panels are still accessible with a top or bottom swipe as they simply behaving like auto-hide does on the desktop.

But when you swap to another app and swap back, my app ends up windowed with the top and bottom panel being visible again and the touch screen calibration is now off. Widgets near the top and bottom of the screen have touch locations which do not match their render locations. Closer to the center of the screen the widgets touch locations better match their render location.

I was fixing this by making an additional call to Window.fullscreen() after returning to the app, but recently this quit working.

I am suspecting there is a better way to interact with Phosh to control the behavior of the top and bottom panels so I can restore fullscreen mode for my app. However documentation on Phosh panel control APIs are scant at best.

One can maintain proper calibration if they never leave the app for another app. However I want people to be able to swap between apps. Linux mobile devices are better suited for running multiple apps than Android devices IMHO because they tend to have more free memory and they do not kill backgrounded apps like Android does.

1 Like

I think I don’t understand what you’re aiming at. I read your original post as if you’d need fullscreen for offering calibration and once that is done all is fine but now it sounds as if your app needs fullscreen to work correctly:

But when you swap to another app and swap back, my app ends up windowed with the top and bottom panel being visible again and the touch screen calibration is now off.

This looks like the bug you want to look into. Your app should map touch to screen position correctly in about any window size as you can’t expect to be always fullscreen (otherwise you could e.g. draw the shell chrome yourself and trick the user into acting like phosh itself)

1 Like

My apologies for being unclear. Kivy on Phosh devices has a problem with mapping touches to widgets because it talks directly to the multi-touch device character file in /dev/input/ and it uses triangulation to map that to a screen coordinate. On Linux it doesn’t know how to share the touch coordinates with other apps, in this case Phosh’s top and bottom panels.

I couldn’t figure out how to tell Kivy that Phosh was negatively affecting its coordinate mapping scheme so I found I could fix it by fullscreening the app. That worked beautifully and it gave me more screen real estate to work with which I welcomed.

Let me see if I can illustrate what is happening by posting some screen shots.

Here is my app after it finishes loading and displays the selector screen in fullscreen mode. Calibration is perfect at this point:

Now I swipe up from the bottom of the screen to unhide the top and bottom panels:

This is good still. The app has not been windowed and calibration is still correct.

Now I will swipe down from the top and open Phosh’s controls window:

We are still good here. You can toggle phone features and no problems yet.

Now we will swipe up to close this window and return to the app.

We are still in fullscreen mode and everything works correctly. But let say I forgot to turn off the screen saver and I don’t want the screen locking while I am using the app so I need to switch to the settings app.


Okay now we want to go back to the running app.

Here I returned to the app and opened the set recorder screen. The top and bottom panels are now no longer hidden and calibration is off. If you touch the 0 button too high it will register as a touch to the 5 button because Kivy thinks the 5 button is lower on the touch device than it really is.

Calls to Window.fullscreen() now will no longer restore fullscreen mode which fixes the touch calibration problem.

I am looking for the APIs that one can use to talk to Phosh on how to control the fullscreen or top and panel auto-hide behaviors. A change in behavior happened so after swapping apps subsequent calls to Window.fullscreen() in Kivy no longer restores fulllscreen mode for me. I already have Phosh specific code to disable squeakboard so Phosh panel control calls wouldn’t be a out of sorts for this code base.

I hope this makes my questions more clear.

Thanks for being patient. This is a lot of stuff to wade through.

3 Likes