UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. wdehoog
    3. Best
    W
    Offline
    • Profile
    • Following 0
    • Followers 2
    • Topics 8
    • Posts 103
    • Groups 0

    Posts

    Recent Best Controversial
    • work on media-hub

      Hi,

      I have spent some time with media-hub. I wanted to solve three problems:
      1 The default image for album art is not shown on the Sound indicator panel.
      (https://github.com/ubports/media-hub/issues/6)
      2 Embedded album art of audio streams do not show up on the Sound indicator panel.
      (See https://github.com/ubports/media-hub/issues/9)
      3 Using media-hub playlist still results in choppy audio after a track change.
      (See https://github.com/ubports/ubuntu-touch/issues/1415)

      1. For the default image I have a PR (https://github.com/ubports/media-hub/pull/7).
        It removes the use of some sort of 'dash' server which does not exist anymore and .

      2. For the embedded album art I have a PR (https://github.com/ubports/media-hub/pull/10). It saves the image to a temporary file and let Thumbnailer handle it.

      3. For the choppy audio problem I have a PR (https://github.com/ubports/media-hub/pull/8). Media-hub acquires a new wackelock for every track and releases it when the track is done. If the app is suspended when the track is done it will not signal media-hub to continue playing. But media-hub will keep on playing this time without acquiring a new wakelock and thus the audio becomes choppy.
        This PR makes sure media-hub will acquire a new wakelock when playing the next track even when the app is suspended. It seems to work.

      Part of the media-hub code is used in qtubuntu-media (libmedia-hub-client). There is still some code in there to detach/reattach the app when suspending/activating. I tried all sorts of things but it does not work anymore (unless the Player object is not renewed). Video playing becomes completely broken since event registration/notification is
      messy. Besides that detaching does not seem to do a lot (only sets the lifetime state in mediahub) so I gave up on it.

      There was a proposal to add reference counting and keep the wakelock based on that. I think that won't be needed and would also result in a wakelock being kept when there is no need for it (not playing).

      posted in OS
      W
      wdehoog
    • support for led notifications

      [edit 2019/11/20] {
      Sorry I give up. I have working code but the automated tests fail. Unfortunately the testing framework is even more complicated then unity itself and the things it tests are trivial. I see no use in crafting dbus messages and plugins just to automatically 'test' a led turning white or green.

      Small advice: maintaining this test bed is too big a burden for a project this short of man power. I think you really should get rid of it.
      }

      I want to have the led on my phone show it is being charged or it's battery is full.
      One of the core developers on telegram pointed out that this could be done by extending repowerd. So I tried to do that.

      [edits] {
      2019/11/09 made a PR for unity8
      2019/11/07 I am now changing IndicatorsLight.qml. You can already try it. No need to build anything, just replace the qml file (keep a copy).
      }

      This is my first step in ubports and I have absolutely no clue of the architecture of ubports or the direction it is going into. So any development related reactions are welcome.

      What I did:
      Created a LightControl that does two things. Control the led (on/off/color etc) and manage the led. With managing I mean show a certain event charging, full, etc.
      The battery state is monitored by UPowerPowerSource. I made it pass the BatteryInfo in its changed callback and have DefaultStateMachine pass it along.
      Furthermore DefaultStateMachine also notifies display on/off.
      Led styles are now hardcoded but could be made to use DeviceConfig.
      Currently the led is off when the display is on. It can show charging (white pulsing) and full (solid lime green).

      Choice to make

      • Currently the led shows dark green when a message is 'new'. This is handled by a qml file in Unity.
        There cannot be two captains on this ship so either Unity must take care of managing the led or repowerd. I opt for repowerd.
      • Should the led be controllable through dbus?

      Problems

      • I need information on how to know the state (or keep track of it) of pending new messages and missed calls.
      • I don't have sim card in my phone. How can I test 'pending new message'?

      My work can be found in the add-light branch of repo https://github.com/wdehoog/repowerd
      Development is done using cross-builder. I test it on my oneplus one.

      When interested to test see: https://gist.github.com/wdehoog/c7c09a792799d03e6880e10dbc19ab33

      PS.
      I have very strong feelings about the testing framework of repowerd. The COC probably forbids me to express them.

      posted in OS
      W
      wdehoog
    • renamed shoutcast-ubports into shoutcast-ut

      Hi,

      I have renamed my app shoutcast-ubports into shoutcast-ut. This in order to remove any link with the UBports Foundation.

      Some time ago there was a general request in the telegram groups to not use the foundations name and a new release seemed like a proper moment for the rename.

      The new app is added to the open-store and the old one removed. New github url is https://github.com/wdehoog/shoutcast-ut

      Sorry for any inconveniences. (Believe me, mine were bigger then yours.)

      posted in App Development
      W
      wdehoog
    • RE: CardDav (contacts) support

      @Thatoo I am not one of the devs but please allow me to respond.

      You are completely right that contacts sync is very important and that it's current state is bad. However you are wrong in thinking that MIR and Lomiri are geeky and not used by your mum. In fact everybody uses them and without them there is no Ubuntu Touch.

      Unfortunately the current state of affairs is that the few devs have to spend all their resources to developping the base system and do not have much left to work on higher layers like contacts sync.

      As this is a community project you will have to work on it yourself or wait until somebody else will.

      Me I would like to read a book and listen to the music files on my dlna server. As this could not be done I had to start working on my own app and fixing/extending various parts of ubuntu touch (led, gestures, media-hub).

      Sorry I cannot help you making you feel better but I hope you can understand why things are as they are now.

      posted in OS
      W
      wdehoog
    • RE: Spotify client

      @CiberSheep said in Spotify client:

      It was a working app but
      needs to be updated to Xenial.

      Unfortunately that app uses an old Spotify API that is not available anymore. I will be way more work then updating it to Xenial.

      posted in App Development
      W
      wdehoog
    • RE: support for led notifications

      @matteo to test your leds. It is also interesting to see the permissions. For example on opo:

      phablet@ubuntu-phablet:~$ find /sys -name brightness -ls
          13414      0 -rw-rw-r--   1 system   android_input     4096 Jan  5 20:48 /sys/devices/f9924000.i2c/i2c-2/2-0068/leds/red/brightness
          13442      0 -rw-rw-r--   1 system   android_input     4096 Jan  5 20:48 /sys/devices/f9924000.i2c/i2c-2/2-0068/leds/blue/brightness
          13428      0 -rw-rw-r--   1 system   android_input     4096 Jan  5 20:48 /sys/devices/f9924000.i2c/i2c-2/2-0068/leds/green/brightness
          11561      0 -rw-rw-r--   1 system   android_input     4096 Jan  5 20:48 /sys/devices/mdp.0/qcom,mdss_fb_primary.169/leds/lcd-backlight/brightness
          19339      0 -rwxrwxrwx   1 system   android_media     4096 Mar  3  1970 /sys/devices/leds-qpnp-f6287e00/leds/led:flash_torch/brightness
          19303      0 -rwxrwxrwx   1 system   android_media     4096 Mar  3  1970 /sys/devices/leds-qpnp-f6287e00/leds/led:flash_0/brightness
          19320      0 -rwxrwxrwx   1 system   android_media     4096 Mar  3  1970 /sys/devices/leds-qpnp-f6287e00/leds/led:flash_1/brightness
          17399      0 -rw-r--r--   1 root     root              4096 Jan  7 20:27 /sys/devices/leds-qpnp-f628c000/leds/kpdbl-pwm-2/brightness
          17421      0 -rw-r--r--   1 root     root              4096 Jan  7 20:27 /sys/devices/leds-qpnp-f628c000/leds/kpdbl-pwm-3/brightness
          17443      0 -rw-r--r--   1 root     root              4096 Jan  7 20:27 /sys/devices/leds-qpnp-f628c000/leds/kpdbl-pwm-4/brightness
          17377      0 -rw-rw-r--   1 system   android_input     4096 Jan  5 20:48 /sys/devices/leds-qpnp-f628c000/leds/button-backlight/brightness
          16275      0 -rw-rw-r--   1 system   android_input     4096 Mar  3  1970 /sys/devices/qcom,camera-led-flash.83/leds/torch-light/brightness
          17292      0 -rw-r--r--   1 root     root              4096 Jan  7 20:27 /sys/devices/msm_sdcc.1/leds/mmc0::/brightness
          17335      0 -rw-r--r--   1 root     root              4096 Jan  7 20:27 /sys/devices/msm_sdcc.2/leds/mmc1::/brightness
      

      If 'phablet' is allowed you can try:

      echo 1 > /sys/...../brightness
      

      if not you must do it as root:

      sudo bash -c "echo 1 > /sys/...../brightness"
      

      (replace the dots with the full path) and try to echo different values (0,1,64,255)

      Then it would also be interesting to show what other files reside in the same directories as the 'brightness' file. For example on opo:

      phablet@ubuntu-phablet:~$ ls -l  /sys/devices/leds-qpnp-f6287e00/leds/led:flash_torch/
      total 0
      -rwxrwxrwx 1 system android_media 4096 Mar  3  1970 brightness
      lrwxrwxrwx 1 root   root             0 Jan  7 20:33 device -> ../../../leds-qpnp-f6287e00
      -rw-rw-r-- 1 root   root          4096 Jan  7 20:33 flash_blink
      -rw-rw-r-- 1 root   root          4096 Jan  7 20:33 led_mode
      -rw-r--r-- 1 root   root          4096 Jan  7 20:33 max_brightness
      drwxr-xr-x 2 root   root             0 Mar  3  1970 power
      -rw-rw-r-- 1 root   root          4096 Jan  7 20:33 strobe
      lrwxrwxrwx 1 root   root             0 Jan  5 20:48 subsystem -> ../../../../class/leds
      -rw-r--r-- 1 root   root          4096 Jan  7 20:33 trigger
      -rw-r--r-- 1 root   root          4096 Mar  3  1970 uevent
      

      And please post a dmesg log somewhere. Maybe this is related: https://e2e.ti.com/support/power-management/f/196/t/421131

      posted in OS
      W
      wdehoog
    • Building an image

      I am trying to fix some issues for my opo and therefore need to build an image.
      There are two documented methods I am aware of:

      • http://docs.ubports.com/en/latest/porting/ubp-5.1.html
      • https://github.com/ubports/device-builds

      For me both do not work. The 'device-builds' one does not work at all. Building fails with various errors.

      The 'docs' one builds and I can flash the boot.img and update the system.img and the phone boots etc.. However the camera stops working.

      While cheking why the camera stopped working I noticed the system.img installed by the UBports Installer contains different files the the one I have built. So it seems there is yet another way to build an image.

      So is there another 'howto' for building an image? Or do the before mentioned descriptions need a little bit of tweeking?

      posted in Support
      W
      wdehoog
    • RE: [solved] clickable building with non-zero exit status

      @Aury88 maybe you have to add yourself to the docker group so you get permission to run docker.

      posted in App Development
      W
      wdehoog
    • RE: OnePlus One Battery At 50% Issue

      @Lakotaubp if you want to see how the system reads your battery state you could try this in a terminal:

      cat /sys/devices/qpnp-charger-f6284000/power_supply/battery/uevent
      
      posted in Off topic
      W
      wdehoog
    • RE: support for led notifications

      @dobey
      So repowerd will listen on dbus to set the led on/off state, color and pulse rate.
      Unity will decide if and how the led should shine.

      Now the thing is repowerd already knows about the battery state and the display state.
      So I think part of the policy could best be done in repowerd:

      • only show the led when the display is off
      • indicate battery low (or hot?)
      • if no other state for the led is set then show charging/full
        unity will then set the led state regarding unread messages, bluetooth or whatever comes next

      But I am new here so you I'll follow your advice.

      The order would then be

      • move led hardware control to repowerd.
      • Allow the led state to be controlled through dbus.
      • Let unity use the led using dbus (extend Powerd plugin, remove Lights plugin).
      • Add led indication of battery state low/charging/full.
        Question is where should this be done and how does it get the battery info?
      posted in OS
      W
      wdehoog
    • new app: hutspot, a spotify controller

      Hi,

      I am working on a app called Hutspot. It is a Spotify Controller (not a player).
      It uses the Spotify web-api. Playing is done on an ‘connect’ device. It requires a premium Spotify account.

      I use it on my oneplus one on which I also installed Spotifyd, a player. It is not really easy to setup nor stable so only try this if you are willing to 'mess around'.

      Documentation can be found online where I also describe how I use Spotifyd.

      Code is on github. Armv7 builds can be found on the releases page.

      posted in App Development
      W
      wdehoog
    • RE: OnePlus One Battery At 50% Issue

      @domubpkm you'll have to find the correct path for your device.
      For N5 I think it is

      /sys/devices/soc/qpnp-fg-17/power_supply/bms/uevent
      

      a good start will be to search for power_supply:

      find /sys/devices -name power_supply
      

      Sometimes the kernel also provides a path through /sys/class.

      posted in Off topic
      W
      wdehoog
    • RE: support for led notifications

      @matteo if the led support is build as a module then this module can be copied to the rootfs. If not I guess you can test a new kernel with fastboot boot which boots the kernel without installing it first.

      posted in OS
      W
      wdehoog
    • RE: Ho to display music info on multimédia player?

      Hi,

      Does your audio file contain any tags? Maybe the media-hub (which is playing the audio using gstreamer) ignores the meta data you have set and only uses the information it extracts from the file.

      posted in App Development
      W
      wdehoog
    • RE: Last FM?

      Music is being played by the media-hub. It sends Mpris2 compatible signals on dbus. So a small service (for example in python) can pickup the meta data of the played tracks and send it to LastFM.

      posted in Off topic
      W
      wdehoog
    • RE: [REQUEST] VNC Server testing/assistance

      @abmyii It seems to work well. No errors in the log. (Oneplus One, rc channel, Ultravnc on windows 10).

      I ran it with

      phablet@ubuntu-phablet:/opt/click.ubuntu.com/mirvncserver.abmyii/1.0.0$ LD_LIBRARY_PATH=lib/arm-linux-gnueabihf/ ./mirvncserver  -m /run/mir_socket --cap-interval 2 -s 432 768
      

      thanks for creating this

      posted in App Development
      W
      wdehoog
    • RE: Audio Player:The QMediaPlayer object does not have a valid service

      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.

      posted in App Development
      W
      wdehoog
    • RE: Audio Player:The QMediaPlayer object does not have a valid service

      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.

      posted in App Development
      W
      wdehoog
    • RE: Publishing updated app from another maintainer

      @Aloys many thanks for your work. I published your click file. If you want to change anything on the open store page please ask.

      posted in App Development
      W
      wdehoog