Audio Player:The QMediaPlayer object does not have a valid service
-
@Einstein212 thanks. UTmedia does work on my phone but when I copy it's apparmor stuff it does not help. Maybe because UTmedia is a webapp and mine is qml.
Even if I add all policies in the IDE still using Audio is DENIED.
Could it be the way I install it?
I use 'pkcon --allow-untrusted install-local'. -
It appears that when installing my click app there is a apparmor profile being made in /var/lib/apparmor/profiles/. It also appears none of the policies I added are being addressed in the generated profile.
I edited the generated profile and added
#include <abstractions/audio>
#include <abstractions/dbus-strict>
#include <abstractions/dbus-session-strict>reloaded the profile and now the Audio tag works.
So how is this ever supposed to work?
-
sorry that should have been:
#include <abstractions/audio>
#include <abstractions/dbus>
#include <abstractions/dbus-session>the -strict ones did not help
-
@wdehoog said in Audio Player:The QMediaPlayer object does not have a valid service:
@Einstein212 thanks. UTmedia does work on my phone but when I copy it's apparmor stuff it does not help. Maybe because UTmedia is a webapp and mine is qml.
Maybe you can find another open source, UT, audio app that is qml to check
-
Installing my click using 'pkcon...' generates a different profile file then when done manually (aa-clicktool & aa-easyprof see https://wiki.ubuntu.com/SecurityTeam/Specifications/ApplicationConfinement/Manifest). The manual way adds extra rules that allow the app to use the media-hub.
I noticed that uninstalling the app did not remove the profile. Manually removing the profile (from /var/lib/apparmor/profiles and from /var/cache/apparmor/) and then reinstalling the click resulted in a profile that could actually work.
After loading it (apparmor_parser -r) my app works!
So I think that after adding the policies in the IDE and installing the new click the previous profile (without the policies) was still being used. Question is why? Maybe because the profiles are cached and I did not increase the version number of my app.
-
First and maybe only release of the app is now available here: shoutcast-ubports.wdehoog_0.1_all.click
It is a shoutcast browser and player. Sources and screenshots are on github
Please give it a try. I only tested it on my moto g 2nd (thank you walidham) but like to know if it works on other devices before submitting it to the OpenStore.
-
@wdehoog I download and install the click package. But i don't get an icon on my home screen to start your program
Do you think it is hard work to get a program made for soundcloud?
-
@Einstein212 did the icon not appear after refreshing home (pull down to refresh)?
Does soundcloud have an API to browse/search and retrieve lists?
-
@wdehoog now i did a refresh and it's there. Nice work. Rock Antenne is running
https://developers.soundcloud.com/ here are some infos for developer, but i don't have api experience to say this informations makes it possible to build a programm around this.
-
@Einstein212 I did not know about soundcloud and now see that it supports a lot of features. It will be no small effort. As it is of no use to me I am not going to work on it. If you are a developer yourself and need help I might be of use.
There is a project on github that could be of interest to you https://github.com/lukedirtwalker/musikloud2 looks like a soundcloud client for sailfish maybe parts can be used for a ubports app.
-
@wdehoog i'd love to develop stuff for ubports, but my skills not good enough. Also i have not so much free time at the moment to lern something
Thanks for the link, i will take a look on the code.