×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Jan 2012
    Posts
    8

    Question Accessing tags database in Harmattan

    Hi all,

    I have a little sharing app in development for the N9 Harmattan. I'd like to add hashtag support (twitter, diaspora, etc) and would like to enable the user to choose from the same tags as the Gallery. I would need to not only read the tags, but save new tags as well.

    Any pointers to code relating to the tag chooser in the Nokia N9 Gallery app? Or at least what API could be used to access the tags?

    Looked around various places for hours and cannot find anything

    Thanks!

    Br,
    Jason

  2. #2
    Super Contributor
    Join Date
    Mar 2009
    Posts
    1,024

    Re: Accessing tags database in Harmattan

    To read and write tags you can use sparql queries since tags are stored in a sparql DB.

  3. #3
    Registered User
    Join Date
    Jan 2012
    Posts
    8

    Re: Accessing tags database in Harmattan

    Thanks, will look at QtSparql lib. Was going to ask "where" but also got an answer from TMO (http://talk.maemo.org/showthread.php?p=1158608) - so it's Tracker DB

  4. #4
    Registered User
    Join Date
    Jan 2012
    Posts
    8

    Re: Accessing tags database in Harmattan

    Any idea why this QML fails in QtCreator and device (N9 PR1.1)?

    import QtSparql 1.0
    http://harmattan-dev.nokia.com/docs/...del.html?tab=1

    Got a hint to try 0.1, which works on device, but 'SparqlListModel' is not recognized.

    Something related to PR1.2 which is in the docs already?

  5. #5
    Registered User
    Join Date
    Jan 2012
    Posts
    8

    Re: Accessing tags database in Harmattan

    Started working with Python-QtSparql.

    Got access denied to tracker DB and set up Aegis permissions to read/write. However, query returns this error:

    QTrackerDirectSyncResult: QSparqlError(9, "GDBus.Errorrg.freedesktop.DBus.Error.AccessDenied: Rejected send message, 2 matched rules; type="method_call", sender=":1.404" (uid=29999 pid=17355 comm="/usr/bin/python /opt/sharetus/sharetus.py http://w") interface="org.freedesktop.Tracker1.Steroids" member="Query" error name="(unset)" requested_reply=0 destination="org.freedesktop.Tracker1" (uid=29999 pid=1327 comm="/usr/lib/tracker/tracker-store "))", 4) "select naorefLabel(?d) where { ?d a nao:Tag}"
    I checked permissions for the PID and they seem ok:

    ~ $ accli -p 1327 -I
    Credentials:
    UID::user
    GID::metadata-users
    SRC::com.nokia.maemo
    AID::com.nokia.maemo.tracker.
    TrackerReadAccess
    TrackerWriteAccess
    tracker::tracker
    tracker::tracker-extract-access
    tracker::tracker-miner-fs-access
    So it looks ok to me. Ideas, anyone?

  6. #6
    Super Contributor
    Join Date
    Mar 2009
    Posts
    1,024

    Re: Accessing tags database in Harmattan

    Hi,
    1327 is the sever PID, so it's not the right one to check.

  7. #7
    Registered User
    Join Date
    Jan 2012
    Posts
    8

    Re: Accessing tags database in Harmattan

    Quote Originally Posted by gnuton View Post
    Hi,
    1327 is the sever PID, so it's not the right one to check.
    Argh, so it is

    I rechecked the correct PID while the app is running and the required permissions don't show. However, when launching the Python app via the Share UI (like it will really be done) the permissions show:

    30633 user /usr/bin/python /opt/sharetus/sharetus.py http://www.google.com/m/search?clien...-meego&q=linux kannettavat linux kannettavat - Google-haku
    30639 user ps aux
    ~ $
    ~ $ accli -p 30633 -I
    Credentials:
    UID::user
    GID::users
    SRC::com.nokia.maemo
    AID::com.nokia.maemo.libshare-ui.
    TrackerReadAccess
    TrackerWriteAccess
    libshare-ui::libshare-ui
    ~ $
    So hopefully I'll be able to read Tracker DB - though debugging is harder. Any idea why it is different if I call /usr/bin/python /opt/sharetus/sharetus.py directly and via the Share UI?

    The path's I've set in aegis are:

    <for path="/opt/sharetus/sharetus.py" />
    <for path="/usr/bin/python" />
    <for path="applauncherd-launcher::/usr/bin/applauncherd.bin" id="" />
    I guess the last one is not needed at all (it was there by default), maybe not the first one either?

Similar Threads

  1. Accessing ShareUI on Harmattan/MeeGo ?
    By mac1ej in forum Nokia N9
    Replies: 34
    Last Post: 2012-03-23, 02:49
  2. Accessing database
    By siva_321 in forum Symbian
    Replies: 5
    Last Post: 2010-05-06, 08:41
  3. Problem accessing SQL database
    By danhicksbyron in forum Symbian
    Replies: 8
    Last Post: 2010-03-18, 04:02
  4. Accessing log database
    By passionateamit in forum Symbian
    Replies: 1
    Last Post: 2008-10-03, 08:18
  5. accessing database from win32
    By lightman1 in forum Symbian
    Replies: 0
    Last Post: 2003-05-08, 16:05

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×