UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. Mick21367
    M
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 11
    • Groups 0

    Mick21367

    @Mick21367

    2
    Reputation
    53
    Profile views
    11
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    Mick21367 Unfollow Follow

    Best posts made by Mick21367

    • RE: Using image from Content Hub

      @CiberSheep Thank you - I've finally (!) managed to move it to a writeable location :-). Just for info, the variation I used was
      picker.activeTransfer.items[0].move("/home/phablet/.local/share/<app_name>/","picked")
      as I'm only importing one picture.
      A couple of extra questions - does anyone know if the above can be used to overwrite an existing file (the user may want to change the picture from time to time) or can the imported file (the one that we've moved) be deleted?
      @CiberSheep Thanks again - your help has been invaluable 🙂

      posted in App Development
      M
      Mick21367
    • RE: Writing a value to a seperate QML page

      @AppLee
      Updating d9 directly, as you suggested, worked a treat 🙂 - I didn't realise it could be done so simply, but I'm happy that's the case :-).
      Thank you so much for all your help - it's been invaluable.

      posted in App Development
      M
      Mick21367

    Latest posts made by Mick21367

    • Unable to install ubports via Installer

      Hi,
      For some bizarre reason, my BQ E4.5 decided it would no longer recognise USB charging or data while switched on last week. I replaced the battery (not as much fun as it sounds, but straightforward enough) which made no real difference. Then I dug out the old Android image BQ provided a while back and installed it with SP_Flash tool (worked fine), then the original Ubuntu touch image the same way.
      When I try to use the UBPorts installer though, it gets as far as rebooting to fastboot (formatting cache in the installer) and that's it - the USB isn't charging or carrying data because the phone is on :-(.
      Is there a way of installing a UBPorts image using the SP Flash Tool? And is there a downloadable image for it? All of the info I can find is for the installer...
      Given that it is a (nearly) 7 year old phone, it's not urgent - it is used for development when I can convince myself to sit down and concentrate 🙂

      PS - just in case it's not clear from the above, the phone charges fine when switched off

      posted in BQ E4.5
      M
      Mick21367
    • RE: Writing a value to a seperate QML page

      @AppLee
      Updating d9 directly, as you suggested, worked a treat 🙂 - I didn't realise it could be done so simply, but I'm happy that's the case :-).
      Thank you so much for all your help - it's been invaluable.

      posted in App Development
      M
      Mick21367
    • RE: Writing a value to a seperate QML page

      Hi AppLee, Thanks for that - it's much appreciated :-). I fiddled about with onCurrentPageChanged a bit but couldn't find much documentation on it, so failed to make much progress. I did find some stuff on the pageStack, though - I've found a (probably terrible) workaround by adding the following line to the onDelegateClicked action of the ItemSelector os2 in Settings.qml (the theme selector) - pageStack.push(page0, {message: d9=appdata9.contents.theme});. It appears to work OK, though there is a console error (" Property 'push' of object AdaptivePageLayout_QMLTYPE_62(0x17de290) is not a function
      ") so I'm not sure if I'm breaking anything with this?

      posted in App Development
      M
      Mick21367
    • RE: Writing a value to a seperate QML page

      Hi AppLee,
      You're right - I should have linked to the source code 🙂 - it's at : - https://bazaar.launchpad.net/~aurora-l/iquit/main/files/head:/qml. The two files in question are Main.qml (this is where the U1DB fields are loaded, I believe) and Settings.qml (this is where the field is written to). It's a bit messy, I afraid.
      I think you are right with the onCompleted though I don't understand why it would change before (when it was all contained in one file). I think it may be a problem with referencing an 'external' qml page, rather than an 'internal' page? I've tried writing to the field in Main.qml but it usually comes back with a reference not found error.
      Anyway, thanks again for replying 🙂

      posted in App Development
      M
      Mick21367
    • Writing a value to a seperate QML page

      Hi,
      I've got an app which currently has multiple pages all contained within 1 QML file (Main.qml). I've been messing about with splitting the various pages into several QML files - so Main.qml, Setting.qml, etc. So far, it's (mostly) all working as expected. One exception is 'theme' - the settings page contains a list view allowing the user to switch between 'themes' - select the appropriate option and the app theme changes immediately.
      Separating the two, however, the theme doesn't change immediately - only after restarting the app. The selected theme is read from a Text field (in Main.qml), which itself reads from a U1DB value. The U1DB value is written to from a ListView in Settings.qml.
      I can see, when changing the value in Settings.qml, that the value in U1DB changes immediately (I have another text field in Settings.qml reading the appropriate index). However, the field in Main.qml (which reads from the same index) stays the same until the app is restarted.
      Anyone have any idea how to make the Text field in Main.qml read the U1DB index 'live'? I've tried a timer to refresh the value, but it doesn't appear to make any difference.
      It's not super important - the user can always select the theme and restart the app to apply - more curiosity and a desire to retain previous functionality.
      Thanks
      Mick

      posted in App Development
      M
      Mick21367
    • RE: Using image from Content Hub

      @CiberSheep Thank you - I've finally (!) managed to move it to a writeable location :-). Just for info, the variation I used was
      picker.activeTransfer.items[0].move("/home/phablet/.local/share/<app_name>/","picked")
      as I'm only importing one picture.
      A couple of extra questions - does anyone know if the above can be used to overwrite an existing file (the user may want to change the picture from time to time) or can the imported file (the one that we've moved) be deleted?
      @CiberSheep Thanks again - your help has been invaluable 🙂

      posted in App Development
      M
      Mick21367
    • RE: Using image from Content Hub

      @CiberSheep Thanks for the link. Unfortunately, I still can't get it to work. I'm off to sleep now but if you get a chance, can you answer a couple of questions?
      How does the ContentItem move actually work? The documentation is less than clear, unfortunately. If possible, can you point me to a very simple example (sorry, I'm nowhere near clever enough to follow the example you gave!)?
      If it helps, the idea is that the user would replace a placeholder with an imported picture (a la Webapp Creator) and, if they wanted to, would click a button to permanently replace that placeholder - so the new picture would overwrite the old placeholder.
      Don't worry if this isn't possible - it's a learning experience for me rather than something remotely useful to anyone 🙂
      Thanks (and good night!)
      Mick

      posted in App Development
      M
      Mick21367
    • Using image from Content Hub

      Hi,
      I've been going through the process of importing an image from the content hub by following the tips here:- https://docs.ubports.com/en/latest/appdev/guides/contenthub.html.
      It all works as expected (Yay!) but I have no idea how I can get the imported app to stay put following an app restart 😞 - in the example above the WebApp Creator app doesn't need to retain the imported image.
      Does anyone have any idea (or can point to links on) how to import the image permanently? I've had a look at the rest of the documentation and other apps which use the content hub, but haven't had any luck so far.
      The image is stored (temporarily) in the HubIncoming folder but that, of course, doesn't survive a restart.
      Thanks
      Mick

      posted in App Development
      M
      Mick21367
    • RE: Clickable desktop not executing on AMD64 with arch ARMHF

      @tusharsaurabh Really? Strange, I still get the same error? where did you change the architecture field? In the manifest.json.in file?

      posted in App Development
      M
      Mick21367
    • RE: Clickable desktop not executing on AMD64 with arch ARMHF

      I'm getting the same error since the last clickable update (this morning in my case). I think it may be related to this:-
      https://gitlab.com/clickable/clickable/issues/181
      No idea how to work around that though?
      Running clickable to an attached device works as expected though (probably because the architecture in this case is 'all').

      posted in App Development
      M
      Mick21367