Using Nokia Qt to send message in S60 (Nokia E72) - qt

I am new to Qt, and trying to use QtMobility to send message. I am using example in this link:
http://doc.qt.nokia.com/qtmobility/writemessage.html
I am able to compile the source code, and it can be tested on the simulator. But when I deploy it to E72, the program failed. Because it can't found any available accounts. The problem lies in this code:
// Find the list of available accounts and add them to combo box
foreach (const QMessageAccountId &id, manager.queryAccounts()) {
QMessageAccount account(id);
...
}
if (accountDetails.isEmpty()) {
QMessageBox::warning(0, tr("Cannot send"), tr("No accounts are available to send with!"));
QCoreApplication::instance()->quit();
} else {
accountCombo->setCurrentIndex(0);
}
The code enter the (accountDetails.isEmpty()) on the device, but it is okay when at simulator. So the manager.queryAccounts() return an empty list.
What exactly is account? in simulator it is SMS and MMS. But why in the device is empty? The code doesn't initialize the manager so I can't trace how it is work. Oh, btw, manager is a QMessageManager instantiation. What should I do so it is work in the device?
I am using Nokia Qt SDK with QtMobility version 1.0.2, if that's helping.

Okay, I got the answer. The problem isn't with the application or the qt. But the certification. The QMessageManager somehow need to access the OS. It is described at the *.pro file, at the symbian:TARGET.CAPABILITY. That's called capabilities. And some capabilities can't be self-signed which is the default at the Project Setting. It is need to be signed.
I used Open Signed here: https://www.symbiansigned.com/app/page/public/openSignedOnline.do to get the file signed. After the file signed, install the signed file to the device, and the program can access the OS, and the QMessageManager's queryAccounts() won't return an empty result.
that's it. And the message can be sent.
I think it is kind of annoying when I need to test it to the device I need to signed it first. And the offline need a license which is not free, while I am just learning. *sigh
EDITED:
Somehow I am able to run it with self-signed. But I don't know exactly how it can be. What am I doing:
run the self-signed application with QtCreator. error: can't copy from computer to device
restart device
run the self-signed application with QtCreator. error: general OS related
Install application manually with PC Suite. Many warning.
And I forgot what's next
- try run with QtCreator. works fine.
- or uninstall with PC Suite first.

Related

Camera and microphone permission for command line util in Mojave

I’m developing a command line utility which needs microphone and camera access but in Mojave the permission request is not requested.
I think the problem is due to the fact that for accessing this devices a bundle with an info.plist describing the need for device usage is needed.
Am I missing something or there is an alternative method?
I need to run command line util only on my mac, maybe in the background, no app store or enterprise distribution.

QML crashed if static build

I build static Qt 5.10.1 with mingw32.
Ref: https://github.com/arkceajin/QtDemos/blob/master/windows-build-qt-static/windows-build-qt-static.ps1
For testing purpose, build an empty QML project, it could run perfectly in QtCreator.
But if I copy the release build to another Win10&7 PC which doesn't contain the Qt environment, it will crash after the windows appeared. I'm guessing something missed inside QML.
Update:
I found No qmlscene installed appears in the Qt Versions tab, not sure it relates to the issue or not.
These two files did generate in the build folder.
projectname_plugin_import.cpp
projectname_qml_plugin_import.cpp
Found the similar issue: https://forum.qt.io/topic/42145/i-can-t-run-static-qt-qml-app-on-another-computer
Update 2:
Problem solved but I want to know why.
Here is I tried:
Connect a Win PC using remote desktop from another Win PC, run a static build QML program, then it crashed immediately after the Window appeared.
Directly login into the same local machine, run the same static build QML program, successful run.
Using the remote desktop run dynamic link QML program with Qt libs, successful run.
So the problem is Windows remote desktop, but I can't find the doc or bug report about it, if you have any idea or guessing, please help me.

Desktop app converter fails to run, with: "The data area passed to a system call is too small"

I have installed Desktop App Converter from the Windows store.
When I try to run the app (literally just launch it), I get the message:
[Window Title]
C:\Program Files\WindowsApps\Microsoft.DesktopAppConverter_2.0.2.0_x64__8wekyb3d8bbwe\DACTileLauncher.exe
[Content]
C:\Program Files\WindowsApps\Microsoft.DesktopAppConverter_2.0.2.0_x64__8wekyb3d8bbwe\DACTileLauncher.exe
The data area passed to a system call is too small.
I have tried running the Troubleshooter for Windows Apps, it tells me that "Windows Store cache and licenses may be corrupt" and tries to fix them, but running the troubleshooter a second time gives the same issue.
Each time I try to run the Desktop App Converter, I get 2 errors in Event Viewer:
%1: Cannot create the Desktop AppX container for package %2 because an error was encountered configuring the runtime.
%4: Cannot create the process for package %1 because an error was encountered while configuring runtime. %5
... both from AppModel-runtime
Any ideas how I can troubleshoot from here?
If you have problems with the Microsoft DAC you try this new converter, it is much easier to use, it has a GUI (no command line), built-in support for digital signing and allows you to customize the list of files that get inside your AppX.
Also, you can generate AppX packages for applications which do not (cannot) install silently.
It runs on Windows 7 too, not just Windows 10 (recommended).

application is closing just after first launch

I have build signed the iPhone application with Adhoc provisioning profile,after installing the application directly through Xcode it launched and then closed. I want to know this is correct behavior or something is wrong in my source code?
I am using Snow Leopard 10.6.6 version of Mac OS.
Please consider the following :
restart xCode
ensure the adHoc provisioning profile is properly installed on the device using the Organizer.
do a clean & build
use the organizer summary panel to add application on your device.
if still failing, please try to restart your device.
if still failing, provide us logs you might have within the console.
Hope this helps.

Adobe AIR NativeProcess - UAC problems when trying to run update installers

I'm trying to use Adobe AIR 2's NativeProcess API to emulate the ApplicationUpdater but I'm encountering problems when I try to run the downloaded AppUpdater.exe file on computers with UAC (User Account Control) enabled.
When run without UAC enabled, the AppUpdater opens as usual and displays the standard Adobe replace dialog box. With UAC enabled, nothing happens at all.
Having run a few traces, it seems the problem arises when I call NativeProcess.start() - the code seems to stop running at this point, and does not run the following lines which exit the application in preparation for the AppUpdater to run.
I have added listeners for all of the possible events and error events that can be thrown, and added logging in each of them, but none of these are producing any output.
This issue only seems to affect installation executables (ones which windows warns will change settings on your computer). Calling java.exe -jar .... on the same computers in the same application works correctly.
I'm at a loss, so any help would be amazing!
After speaking to Adobe directly, I discovered that NativeProcess uses a windows API which is unable to elevate privileges which is why the installers wouldn't work. The workaround was to use File.openWithDefaultApplication which uses a different API that can elevate privileges, but this only works in a native-packaged AIR app (which was just fine for our app since it was already packaged in a native installer :))
adobe answer was http://kb2.adobe.com/cps/404/kb404888.html
but for real steps you should determine the application user privileges and determine UAC enabled, if yes - then warn end-user about it.
I'm expecting that you could do nothing with windows-thing from Adobe Air.

Resources