October 5, 2011

viral.parmar viral.parmar
Lab Rat
6 posts

Listing text messages

 

hi,
I have been searching and i got a code shown below..

  1. Code:
  2.  import Qt 4.7
  3.  import QtMobility.messaging 1.1
  4.  
  5.  Rectangle {
  6.      width: 320
  7.      height: 480
  8.      ListView {
  9.          id: list
  10.          anchors.fill: parent
  11.          model: MessageModel {
  12.              sortBy: MessageModel.Timestamp
  13.              sortOrder: MessageModel.DescendingOrder
  14.          }
  15.          delegate: Item {
  16.              id: wrapper
  17.              height: 32; width: list.width
  18.              Text { id: subjText; text: subject; font.pixelSize: 13; x: 3 }
  19.              Text {
  20.                  text: sender; color: "gray"; font.pixelSize: 9
  21.                  x: 3; width: parent.width-100;
  22.                  anchors.top: subjText.bottom; anchors.topMargin: 3
  23.                  elide: Text.ElideRight
  24.              }
  25.              Text {
  26.                  text: date; color: "gray"; font.pixelSize: 9
  27.                  anchors.right: parent.right
  28.                  anchors.top: subjText.bottom; anchors.topMargin: 3
  29.              }
  30.          }
  31.      }
  32.  }

Doing on-device debugging i am unable to get the list of text message received…
I have symbian Anna Running on my E7 , and recently i came to know that Mobility api is upgraded for symbian Anna. So is this a reason i am unable to get list of text messages ??

 Signature 

Regards
Viral Parmar

1 reply

April 1, 2012

VK2FH VK2FH
Lab Rat
1 posts

Probably too late to reply to this post since it was posted several months ago but I did play around with your code and found I needed to modify the xxx.pro file to display messages otherwise I ended up with a blank screen such as you did.

Try adding ‘ReadUserData’ as below;

  1. Allow network access on Symbian
    symbian:TARGET.CAPABILITY += NetworkServices ReadUserData

Hope this helps :-)

 
  ‹‹ ListElement fields as properties ?      How to interact in between two QML screens? ››

You must log in to post a reply. Not a member yet? Register here!