Hello Developers,
In one of my applications, i need to list all the applications installed in my N9. Can any body help me to find an API for that.
I was not able to find that in Qt Framework atleast.
Hello Developers,
In one of my applications, i need to list all the applications installed in my N9. Can any body help me to find an API for that.
I was not able to find that in Qt Framework atleast.
AFAIK no direct api is given in qt for this.
Use Qt-Quick to make your application UI more attractive.
http://store.ovi.com/content/271896 | http://store.ovi.com/content/276199 | http://store.ovi.com/content/276202 | http://store.ovi.com/content/280827
Hello kkrish
Yes i am aware of that i spent a lot of time into that.
But is there any other way to do this ??
In the terminal application, you can give -
dpkg -l
this lists all the packages installed on N9
The platform 'Applications' plugin in 'Settings' application fetches this information and shows in installed applications list..
So it should be possible, let me check. it should be using dpkg and apt tools internally.
EDIT:
Confirmed, they use dpkg only. I checked the package manager sources here (they are free and available at - http://harmattan-dev.nokia.com/pool/...ckage-manager/
They have used python scripts to fetch the info -
package-manager-1.0.2+0m6/test$ vi test_helper.py
Code:def get_installed_packages_list(): ret=commands.getstatusoutput("dpkg-query --showformat '${Package}\t${Version}\t${Section}\t${Status}\n' -W | grep '.*\t.*\tuser/.*\t.*'") installed = [] lines = ret[1].split("\n") for line in lines: if "install ok installed" in line: t = line.split("\t") installed.append((t[0], t[1])) return installed
Last edited by kusumk; 2012-03-19 at 07:41. Reason: adding info
Ok thats good, but is there any way i can execute this in Qt itself, or i may need to use something like PyQt or some otherway for interfacing Qt Quick and Python.
May be you could try something like this ( i dont think you need python, a simple shell script or running it like a terminal command capturing its output should be ok) using QProcess
Hello all,
one of the application i am starting requires me to list all the apps installed in my Nokia N9 using Qt. As i am both new to Meego and Qt can anybody give me a small working example of how execute this usng QProcess.
Thanks
Hi,
documentation explains quite well how to use QProcess [1]
Once you have executed the process (see code snippet at [1]) you could use ::readAllStandardOutput() to get all stuff which are printed out by the running process.
[1] http://qt-project.org/doc/qt-4.8/qpr...StandardOutput
Hello gnuton,
Thanks for your reply but how can i do that in QML ???
Hello gnuton
i am able to make a c++ class and than was able to expose that to my QML component and now i am able to execute dpkg -l, but the data i get is all text, is there any logic behind that so that i can parse the application name and make a proper model out of that.
Second question i also want the icon related information of each package or application installed how i can retrieve that.
Third i get data about all the packages, is there any way i can get data about user installed applications only.
Regards,
takruk
Hello mikkotvr,
sorry but i am not able to understand what you mean can be more elaborative, the code in #6 is in python.
Thanks
Hello ,
can somebody help me here as i am not able to format the response i get from dpkg -l.
And how can i get the icons for installed apps in Nokia N9.