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.