Skip to content

Mobile and Embedded

The forum for developing everything embedded: Linux, WinCE, Symbian, MeeGo... you name it.
14.1k Topics 62.6k Posts
  • FLAG_KEEP_SCREEN_ON and Android 30

    Solved
    4
    0 Votes
    4 Posts
    2k Views
    mrdebugM
    This approach works on Android 6 and 11 package it.denisgottardello.metronome.metronometouch; public class MetronomeTouchMain extends org.qtproject.qt5.android.bindings.QtActivity { @Override public void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.getWindow().addFlags(android.view.WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); } } This approach works on Android 6 but not on Android 11 QAndroidJniObject activity = QtAndroid::androidActivity(); if (activity.isValid()) { QAndroidJniObject window = activity.callObjectMethod("getWindow", "()Landroid/view/Window;"); if (window.isValid()) { const int FLAG_KEEP_SCREEN_ON = 128; window.callObjectMethod("addFlags", "(I)V", FLAG_KEEP_SCREEN_ON); } }
  • 0 Votes
    5 Posts
    1k Views
    AxelViennaA
    @glassez Well, brief is brief. That's what I said. After all, connect returns a boolean result, to tell (briefly) if it has succeeded or failed. Deliberate and consequent ignorance of such results in class constructors is a gamble. If you believe that the reason may be OpenWRT, so be it. I tend to believe in (and briefly summarize) what I see.
  • Building an(or multiple) android app(s) as part of an existing cmake project

    Unsolved
    2
    0 Votes
    2 Posts
    389 Views
    J
    I also have the same requirement of several Android applications within one CMake project. @MS_36 May I ask how you overcame this?
  • 0 Votes
    2 Posts
    407 Views
    C
    Is there any solution to the packaging and use of Android AAR
  • degree Celsius symbol not displayed in Qt QML

    Solved
    7
    0 Votes
    7 Posts
    1k Views
    V
    @JKSH said in degree Celsius symbol not displayed in Qt QML: toLocal8Bit Code is working correctly with toLocal8Bit() on another device with same bsp & h/w. Only one change is on my device I had updated bsp version & then downgrade it (for testing purpose) , In this process some lib/config may be not reset/remove correctly due to this representation problem comes. Now I have change toLocal8Bit() to toUtf8() and now it works on both devices. tr(QString(array[0]).replace("%1",sign+array[2]).toUtf8()); Thanks to all for help
  • how to build apk target for API level 30 by using qt5.12.4

    Unsolved
    3
    0 Votes
    3 Posts
    672 Views
    C
    @jsulm Thanks a lot Try 1: Due to there is no 30 in QT 5.12.4: [image: f5fa081d-3420-46e9-882d-3d5ccf01c2ca.png] I tried to add: <uses-sdk android:minSdkVersion="22" android:targetSdkVersion="30"/> so I manually set 30 in AndroidManifest.xml, android 64bit apk is built, but the app can not connect with wifi, and log get this " QNetworkInterface/AF_NETLINK: found unknown interface with index 1 .... If set android:targetSdkVersion="29", has no any issue. Try 2: I update with QT 5.15.6, Android Qt 5.15.6 Clang Multi-Abi, and set this in build.gradle: defaultConfig { resConfig "en" minSdkVersion = 22 targetSdkVersion = 30 } App could be build on usb-connected Android 12 device (Pixel5), but even login can not show up. only show app icon at the top of while background. Would you mind give me some suggestion or hint to solve this? thanks a lot
  • QSerialBus Peakcan timestamp

    Unsolved
    3
    0 Votes
    3 Posts
    263 Views
    G
    I check if the Peak hardware is working properly with the peakcan view tool and there I get the correct time stamps.
  • Loadmore logic implementation

    Solved
    2
    0 Votes
    2 Posts
    248 Views
    Q
    Logic: 1] maintain the session id 2] get session id which needed 3] add and remove session id on button click
  • why below code give me .o error 1 ?

    Unsolved
    4
    0 Votes
    4 Posts
    414 Views
    Q
    Because proper file are not added so i created new project and linked all file properly that resolve my error
  • Using iOS native components in QML. How?

    Unsolved
    1
    0 Votes
    1 Posts
    175 Views
    No one has replied
  • Set Palette or stylesheet causing my application did not works properly.

    Unsolved
    6
    0 Votes
    6 Posts
    461 Views
    faduF
    @Buket image: url(:/png/copy_24px.png);
  • [Android] Pass info to MainActivity from C++ side

    Unsolved
    1
    0 Votes
    1 Posts
    160 Views
    No one has replied
  • (Android) Event loop stops on display sleep/screensaver

    Unsolved android event loop screensaver
    1
    0 Votes
    1 Posts
    715 Views
    No one has replied
  • Qt raspberry pi cross compilation make issue

    Solved
    11
    0 Votes
    11 Posts
    4k Views
    J
    @vpicaver Coming here from a related issue. Your comment has saved me from hand jamming linker script hell. Thank you.
  • Qt Android White Line

    Solved
    4
    0 Votes
    4 Posts
    396 Views
    ?
    @SGaist said in Qt Android White Line: Hi, I don't know. You need to add: Qt version Androïd version Is you sample code enough to reproduce this ? If not, please provide a complete minimal example. Yeah It is A bug. Solved Qt 5 https://github.com/jpnurmi/qtstatusbar
  • How to write concisely with QStandardItemModel ?

    Unsolved
    29
    0 Votes
    29 Posts
    4k Views
    DQUY05D
    @JonB said in How to write concisely with QStandardItemModel ?: No, in theory so long as you pick a suitable layout it will adjust what it shows to be suitable for your screen resolution. That's the whole point of layouts. Please read the doc topic I referenced earlier. Very interesting, this is exactly what I was looking for You seem like a friendly person, so I won't shout, but how do you think anyone can comment if you don't tell us whatever these "errors" are? Do you think we should guess/know...? Thank you very much for your help, as I am a newbie and need to learn more, I mean this error is caused by my incorrect layout, I will try again and let you know the result. many thanks!
  • How to change Qt (& QMake) version in Yocto build???

    Unsolved
    1
    0 Votes
    1 Posts
    300 Views
    No one has replied
  • 0 Votes
    2 Posts
    857 Views
    O
    So I've worked out how to do this. Actually quite simple once you know how. Just needed to add the following in the local.conf file: SDKMACHINE = "x86_64-mingw32" SDK_ARCHIVE_TYPE = "zip" Then it was just a simple matter of copying the zip file from the the Unbuntu system by typing \wls$ into windows explorer to find, copy and then extracting the zip file into a windows folder. My only challenges now are that the Qt version is wrong and the CMake version is wrong. Can anyone tell me how to ensure that the SDK has the right version of Qt? I am using 5.12.11 at the moment and my SDK is build for 5.12.10. It would also be appreciated if someone could advise how to ensure the SKD is build with the most up to date CMake version.
  • Error QT Android SDK configuration

    Unsolved
    2
    0 Votes
    2 Posts
    270 Views
    KroMignonK
    @Creatorczyk You have to install android sdk tools, look at those posts: https://forum.qt.io/post/678841 https://forum.qt.io/post/585927
  • QtPurchasing

    Unsolved
    3
    0 Votes
    3 Posts
    322 Views
    J.HilkJ
    @unclebenedict the api/targetsdk should be independent from the Qt version you use. You control that via the AndroidManifest file QtPurchasing was dropped in Qt6 and one is supposed to use the native apis instead of the Qt Wrapper. There are supposed to be examples for how to do this, but the related ticket: https://bugreports.qt.io/browse/QTBUG-82847 is still work in progress 🤷‍♂️ So, coming soon ™️