Show ubuntu (linux) notifications with Qt - qt

I was working with Phonon multimedia framework in Qt, and it popups a message (like the volume notification message that popups when one changes the volume), because my audio device is not fully configurated, is it possible to launch my own notification from Qt?
Please see the image above.
Thank you very much.

AFAIK using libnotify is the way to go, if you dont want to use this method I found after some digging around on the net:
system("notify-send 'The Message Title' 'Your Message Text' '-t' 5000");
the -t parameter is for the notification timeout.
you can read up on notify-send here:
ubuntu forums how-to: using notify-send
a good example how how to do it in Qt in both KDE and GNOME
Thanks to the kind persons who posted the tutorials :) especially the second one; very smart.

This is Ubuntu specific so you cannot achieve (AFAIK) what you want through Qt. In Ubuntu libnotify is used in order to send desktop notifications. You should link your application with it and use the API in order to display the desired notifications. You can find an example here.

Related

PARSE4CN1 Android push don't work

I'm having some trouble integrating my app with the parse4cn1 lib. I followed the tutorial published on this link and the app registers normally on the Parse Server as an installation but when I try to send a push to Android devices they simply aren't being sent.
I haven't tried on iOS yet, since I figured I'd start with Android, and I'm working with a new GUI Builder app if maybe that affects something for any reason.
Thanks for your help.
Ok, I have found the problem, it was related to parse not the parse4cn1 lib. I'm actually new with parse and backend in general, I wasn't aware I had to run the pm2 restart command after modifying the cloud code.
It's working now, thanks!

Exported my Construct 2 game with Intel XDK (edit: Crosswalk); error message shows up. How do I get rid of it?

I just learned about the Intel XDK at Indiecade today, and I couldn't wait to get home to try a port of one of my Construct 2 games. The game ended up working perfectly, aside from the fact that it has no sound when played on my Galaxy S5. The Intel XDK Emulator plays the game with sound, but for some reason it doesn't work on my phone. My volume is all the way up. Are there any tips when importing C2 games with the Intel kit to make sure the sound is preserved?
One thing I might add is when I run the app, it gives me an error message as though I am trying to run it locally in my computer. The actual message:
Alert: Exported games won't work until you upload them. (When running on the file:/// protocol, browsers block many features from working for security reasons.)
And then it auto-jumps to:
Application Error: The connection to the server was unsuccessful. (file:///android_asset/www/index.html)
... as a matter of fact it stopped working altogether after the two error messages while I was typing this question.
Edit: OK... so I exported it within the XDK as Crosswalk rather than simply Android, and the music now works. However, the first error message I mentioned before still shows up. I won't want this on all of my apps. Any way to get rid of it?
OK so this is what I did wrong: When I exported through Construct 2, I did what I always do and exported as a web app. What I should've done is export it as an Android app. I seriously don't know why I didn't try this first but after exporting as Android and then using the Intel XDK to port it with Crosswalk, everything is peachy.
I found my answer here: https://www.scirra.com/blog/133/introducing-crosswalk-the-new-way-to-publish-to-android
I'm glad you found the answer here; I knew there would be a way :)
Just wanted to chip in as a follow-up, there is a webinar tomorrow for a much more in-depth tour of the XDK and its features - including crosswalk - than I was able to provide at IndieCade. Let me know if it works out for you!
Thanks,
Brad
Webinar Link: http://l.intelswpartner.com/u.d?V4GjZxR-vxyrcx8RFF58HZ=33001
This happens if you export as a normal html5 and not as Cordova app.
I had the same problem. I'm calling other HTML offline and solved the problem with this post:
https://software.intel.com/en-us/xdk/docs/adding-third-party-plugins-to-your-xdk-cordova-app
How Do I Reference cordova.js Script from My Project index.html File
To enable the use of Cordova plugins in an HTML5+Cordova project type, reference the cordova.js script file exactly once in your index.html file:
If your project contains more than one HTML file (or page) that will use Cordova APIs, you must include a reference to the cordova.js script file in each of those HTML files. It is highly recommended that you limit yourself to building single-page apps (SPAs) when creating Cordova applications. See this Cordova Best Practices article for more details. Also, note that the cordova.js file is a "phantom" file; it is not present in your project directory, but is added by the Cordova build system when your application is built (it is customized for your app as part of the build process).

While executing appium test on android device, is it possible to type text using the android keyboard

I am testing android device using appium from Mac machine. Sendkeys is failing on a particular page. Following is the description of the issue i already posted. Sendkeys fails on android appium driver.
So I want to know is there any other possibilites to resolve the issue. I spent hours in searching answer for it. But all i can find is pressing back, home buttons. I want to type characters like 'k' , 's' using the android keyboard. Any suggestions?
you can use virtual keyboard on simulator.
if you use genymotion emulator, you can choose to set use or not use virtual keyboard.
and if you use send_keys function failed, you can try element.set_text('your text') instead(python client)
in my case, when i run test on a real device, default call out the android keyboard.
maybe you can provide more details, paste your scripts etc.

QT - qtwebsocket - can't connect

I'm using qtwebsocket from https://github.com/antlafarge/QtWebsocket on QT Creator 5.0, Linux 64bit. I'm trying connect to echo test:
wsSocket->connectToHost( "echo.websocket.org", 80 );
But I immediately get disconnected status. I tried also with ws:// and http:// prefix but same error. Any idea? I even don't know how to report a bug on this gitorious.
It is important to me to don't use webkit, I need pure TCP socket connection.
Regards
There is also a Qt websockets add-on module located at https://qt.gitorious.org/qt/qtwebsockets.
It has been tested on several platforms, and successfully succeeds with the AutoBahn Testsuite.
Just quickly looking at the example located:
https://github.com/antlafarge/QtWebsocket/tree/master/Example
I don't know the state of the project too well, but it looks like there is still a to-do list on what it can do; one item I noticed, it says WSS is not yet supported.
Try running both sides of the Client and Server in the included example, and see if you can get a connection in that context before trying the echo.websocket.org server.
Hope that helps.

how to make .sis go online

I'm trying to write a program with qt for my symbian phone nokia 5800. In my program, i'm trying to go online and save the .html file of a desired website. My program works fine with qt device simulator but when i build it and send to my phone it doesn't work. I guess phone doesn't go online because it doesn't ask me to choose a connection. You guys have any idea? Thanks in advance.
I found the solution by looking at the sample codes of qt.
Try this:
https://projects.forum.nokia.com/CartoonReader/files/releases/QtWebKit_CartoonReader_Example_v1_2_en.zip

Resources