[QtSystemInfo] [QDeviceInfo] can't use this on Android
-
Hi,
Sorry for late answer.
I'm running Android 4.1, I'm developing on Linux.
Getting IMEI is pretty straightforward:
@
sysInfo=new QDeviceInfo(this);
qDebug()<<"NetManager::NetManager imei:"<<sysInfo->imei(0)
@If you know any other way to get unique phone id or sim card id, please tell me.
best regards
Marek -
Could you explain how to build the addon module on windows?
thanks in advance
@C:\Qt\5.3\Src\qt-qtsystems>qmake
Info: creating cache file C:\Qt\5.3\Src\qt-qtsystems.qmake.cache
Checking for gconf... no
Checking for bluez... no
Checking for udev... no
Checking for x11... noC:\Qt\5.3\Src\qt-qtsystems>make
Makefile:162: *** multiple target patterns. Stop.@Line 162:
@Makefile: qtsystems.pro .qmake.conf .qmake.cache C:/Qt/5.3/mingw482_32/mkspecs/win32-g++/qmake.conf C:/Qt/5.3/mingw482_32/mkspecs/features/spec_pre.prf @
-
Hello,
I tried with Qt 5.3.0 but is doesn't work, I have a lot of error when it compile.
-
What OS ?
-
Hello,
I use Windows 8.1 (Italian version) with Qt creator 3.1.1 and Qt 5.3.0 (MingW32)
-
What error message are you getting ?
-
Hello,
this is step by step:I copied qt-qtsystems in C:\Qt\Qt5.3.0\Examples\Qt-5.3
run QtCreator and open the “ qtsystems.pro” project file
get to “Projects->(Your Kit)->Build->Build Steps”
add a new make “Build Step” and write to the “Make arguments” the install target
from the menus, select “Rebuild Project qtserialport”
Path desn't found
Error while parsing file C:/Qt/Qt5.3.0/Examples/Qt-5.3/qt-qtsystems/src/imports/publishsubscribe/publishsubscribe.pro. Giving up.
Error while parsing file C:/Qt/Qt5.3.0/Examples/Qt-5.3/qt-qtsystems/src/imports/serviceframework/serviceframework.pro. Giving up.
Error while parsing file C:/Qt/Qt5.3.0/Examples/Qt-5.3/qt-qtsystems/src/imports/systeminfo/systeminfo.pro. Giving up.
Error while parsing file C:/Qt/Qt5.3.0/Examples/Qt-5.3/qt-qtsystems/src/publishsubscribe/publishsubscribe.pro. Giving up.
Error while parsing file C:/Qt/Qt5.3.0/Examples/Qt-5.3/qt-qtsystems/src/serviceframework/serviceframework.pro. Giving up.
Error while parsing file C:/Qt/Qt5.3.0/Examples/Qt-5.3/qt-qtsystems/src/systeminfo/systeminfo.pro. Giving up.
Project ERROR: Project has no top-level .qmake.conf file.
Project ERROR: Project has no top-level .qmake.conf file.
Project ERROR: Project has no top-level .qmake.conf file.
Project WARNING: You should probably load(qt_build_config) first in publishsubscribe.pro for QtPublishSubscribe, as the latter also load()s qt_module.
Project MESSAGE: Not doing so may lead to qt_module.prf overriding compiler/linker options in your .pro file.
Project MESSAGE: Ignore this warning with CONFIG+=no_qt_module_warning if you know what you are doing.
Project ERROR: Module does not define version.
Project WARNING: You should probably load(qt_build_config) first in serviceframework.pro for QtServiceFramework, as the latter also load()s qt_module.
Project MESSAGE: Not doing so may lead to qt_module.prf overriding compiler/linker options in your .pro file.
Project MESSAGE: Ignore this warning with CONFIG+=no_qt_module_warning if you know what you are doing.
Project ERROR: Module does not define version.
Project WARNING: You should probably load(qt_build_config) first in systeminfo.pro for QtSystemInfo, as the latter also load()s qt_module.
Project MESSAGE: Not doing so may lead to qt_module.prf overriding compiler/linker options in your .pro file.
Project MESSAGE: Ignore this warning with CONFIG+=no_qt_module_warning if you know what you are doing.
Project ERROR: Module does not define version.
Project ERROR: Unknown module(s) in QT: serviceframework
Project ERROR: Unknown module(s) in QT: publishsubscribe
Project ERROR: Unknown module(s) in QT: serviceframework
Project ERROR: Unknown module(s) in QT: serviceframework
Project ERROR: Unknown module(s) in QT: serviceframework-private serviceframework
Project ERROR: Unknown module(s) in QT: serviceframework
Project ERROR: Unknown module(s) in QT: serviceframework
Project ERROR: Unknown module(s) in QT: serviceframework
Project ERROR: Unknown module(s) in QT: serviceframework-private serviceframework
Project ERROR: Unknown module(s) in QT: serviceframework
Project ERROR: Unknown module(s) in QT: serviceframework-private serviceframework
Project ERROR: Unknown module(s) in QT: serviceframework-private serviceframework
Project ERROR: Unknown module(s) in QT: serviceframework
Project ERROR: Unknown module(s) in QT: systeminfo
Project ERROR: Unknown module(s) in QT: systeminfo
Project ERROR: Unknown module(s) in QT: systeminfoWhen i build the project I don't have error, but the In the my project Android
I have this Error:C:\Users\pc\qt-project\Booking\main.cpp:50: error: 'QDeviceInfo' was not declared in this scope
QDeviceInfo sysInfo=new QDeviceInfo(this);
^
I tried with this source code:QDeviceInfo sysInfo=new QDeviceInfo(this); qDebug()<<"NetManager::NetManager imei:"<<sysInfo->imei(0);
Thanks
-
First thing, it's not an example, it's a Qt module, you should rather place it in the same source path as e.g. qtbase.
Like I wrote before, it's not yet implemented for Android