Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. It's very very dificult to develop an Mobile APP for Nokia with QtMobility! Any one help me pls!

It's very very dificult to develop an Mobile APP for Nokia with QtMobility! Any one help me pls!

Scheduled Pinned Locked Moved Mobile and Embedded
5 Posts 3 Posters 4.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hungchuviet
    wrote on last edited by
    #1

    Thank you!
    I'm a beginer QT, I'm a C#,MS C++, SQL server, Oracle develper for a long time
    I've spend 6 days to install and configure Nokia QT SDT, QTMobility.
    I have 2 computer,I've installed Nokia QT SDK, QtMobility, Active perl, CarbIDE.c++
    on all of them:
    On my mobile phone I've installed:
    1.QT for symbian
    2.QTMobility for symbian
    3.TRK
    4.SQLIte

    My project work on 1 computer, on other Computer my app not work. if i desable QtMobility, my app work fine. (The app have

    some line of codes)

    Alot of error happend:
    1.Requested application not granted
    2. No such file or directory ....
    3. OS-Related Error
    4. Include..... not found

    I think, Nokia may be release install package for different platform (Ex: Windows, Unix, Linux )
    each palatform need only one install package (All in one) and simple guid to install.
    The same project, the same computer, some time it work, another time it not work, I don't know
    what's happend.
    Here is my code:
    @
    //-----------------
    untitled.pro

    QT += core gui
    TARGET = untitled
    TEMPLATE = app
    SOURCES += main.cpp
    mainwindow.cpp
    smslib.cpp
    HEADERS += mainwindow.h
    smslib.h
    FORMS += mainwindow.ui
    CONFIG += mobility
    MOBILITY = systeminfo messaging
    symbian {
    TARGET.UID3 = 0xeac1efb9
    TARGET.CAPABILITY=NetworkServices
    LocalServices
    ReadUserData
    WriteUserData
    UserEnvironment
    ReadDeviceData
    WriteDeviceData
    TARGET.EPOCSTACKSIZE = 0x14000
    TARGET.EPOCHEAPSIZE = 0x020000 0x800000
    }
    }
    //-----------------------------
    mainwindow.h
    //-----------------
    #ifndef MAINWINDOW_H
    #define MAINWINDOW_H

    #include <QMainWindow>
    #include <QString>
    namespace Ui {
    class MainWindow;
    }

    class MainWindow : public QMainWindow
    {
    Q_OBJECT

    public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    void setText(QString text);
    void setMsgContent(QString text);
    private:
    Ui::MainWindow *ui;
    };

    #endif // MAINWINDOW_H

    smslib.h

    #ifndef SMSLIB_H
    #define SMSLIB_H
    #include <QMessageManager>
    #include <QMessage>
    #include <QMessageAccount>
    #include <QMessageAccountId>
    #include <qmessageservice.h>
    #include <QMessageFilter>
    #include <QMessageSortOrder>
    #include <QMessageId>
    QTM_USE_NAMESPACE
    class smslib
    {
    public:
    smslib();
    QString readSMS();
    bool sendSMS(QString number,QString textContent);
    private:
    ~smslib();
    };

    #endif // SMSLIB_H

    smslib.cpp

    #include "smslib.h"

    smslib::smslib()
    {
    }
    QString smslib::readSMS()
    {
    QString retVal("Msg content:");
    // Match all messages whose status field includes the Incoming flag
    QMessageFilter filter(QMessageFilter::byStandardFolder(QMessage::InboxFolder));
    //QMessageFilter filter(QMessageFilter::byStatus(QMessage::Incoming));
    // Order the matching results by their reception timestamp, in descending order
    QMessageSortOrder sortOrder(QMessageSortOrder::byReceptionTimeStamp(Qt::DescendingOrder));
    // Acquire a handle to the message manager
    QMessageManager manager;

    // Find the matching message IDs, limiting our results to a managable number
    const int max = 100;
    const QMessageIdList matchingIds(manager.queryMessages(filter, sortOrder, max));
    // Retrieve each message
    foreach (const QMessageId &id, matchingIds) {
        QMessage message(manager.message(id));
        retVal.append(message.content());
    }
    return retVal;//
    

    }

    mainwindow.cpp

    #include "mainwindow.h"
    #include "ui_mainwindow.h"

    MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
    {
    ui->setupUi(this);
    }

    MainWindow::~MainWindow()
    {
    delete ui;
    }
    void MainWindow::setText(QString text)
    {
    ui->lbl_msgSubject->setText(text);
    }
    void MainWindow::setMsgContent(QString text)
    {
    ui->lbl_msgContent->setText(text);
    }

    main.cpp

    #include <QtGui/QApplication>
    #include "mainwindow.h"
    #include <QSystemInfo>
    #include <QMessage>
    #include "smslib.h"
    QTM_USE_NAMESPACE
    int main(int argc, char *argv[])
    {
    QApplication a(argc, argv);
    MainWindow w;
    QMessage *msg = new QMessage();
    msg->setSubject("From chu viet hung");
    w.setText(msg->subject());
    smslib *lib = new smslib();
    w.setMsgContent(lib->readSMS());
    #if defined(Q_WS_S60)
    w.showMaximized();
    #else
    w.show();
    #endif

    return a.exec&#40;&#41;;
    

    }

    -----------------@

    1 Reply Last reply
    0
    • T Offline
      T Offline
      troubalex
      wrote on last edited by
      #2

      Have you seen "this posting":http://labs.qt.nokia.com/2010/10/04/important-update-on-qt-mobility-1-1-0-beta-package/? Maybe that solves it?

      THE CAKE IS A LIE
      Web Community Manager - Qt Development Frameworks

      1 Reply Last reply
      0
      • H Offline
        H Offline
        hungchuviet
        wrote on last edited by
        #3

        Thank you!
        Yes. I follow this guid "Important Update on Qt Mobility 1.1.0 Beta Package" to fix bug. but my app doesn't work.
        I'm very tired

        1 Reply Last reply
        0
        • J Offline
          J Offline
          johnk
          wrote on last edited by
          #4

          Hello,

          Let's look at how you've handled signing. All mobile phone platforms require apps to be signed. Symbian breaks capabilities into a few categories (click "here ":http://developer.symbian.org/wiki/index.php/Capabilities_(Symbian_Signed) for more detail ). Most of the capabilities you reference are user grantable. ReadDeviceData and WriteDeviceData are not. They are system capabilities which require a different kind of signing ( click "here ":http://developer.symbian.org/wiki/index.php/Category:Symbian_Signed for more detail ).

          -jk

          1 Reply Last reply
          0
          • H Offline
            H Offline
            hungchuviet
            wrote on last edited by
            #5

            Thanks you!
            I did that. It's OK.
            Thanks a lot!

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved