4

I'm building an android hybrid_local app that stores data in the smartstore. It seems to be inserted according to my log messages but when I query it, I don't get results back (or I get array.length = 0). So I'm assuming my query is wrong or the data wasn't inserted after all.

I'm using genymotion as an emulator and eclipse to launch the app. What do I have to use to be able to see the smartstore soups en entries in eclipse or some other software? Do I need to install an android app on my emulator?

Update

I got my code working now, don't remember how but that wasn't the question...

I did recently found out how I can find the database file. Using DDMS in eclipse I found the database file on this path "data/data/[app name]/databases/smartstore.db".

Tried opening the file with the Questoid SQLite manager in Eclipse but it gave me a "Failed to create the parts" error message.

Tried downloading the smartstore.db file and opening it with sqlite administrator or SQLite Database browser but no luck. Any idea how I need to open that file and with what program so I can read what is inside?

1
  • 2
    this question appears to be about the salesforce android SDK, i don't see why its off topic. – superfell Dec 23 '13 at 18:08
2

You can use SQLite client or the querySpec() method on the emulator to see your soup list and the data in those soups. As for the mentioned issue, I have seen this occur in my apps when there's a problem in the way A) you are creating your soup index B) you are retrieving data based on the wrong soup index. Tom Gersic from Model Metrics (now Salesforce) has published this open source example which shows you can see the list of soups and in turn the contents of each soup.

Also, make sure to see this PPT to understand how data is organized/ stored in soups. If you do see the soups are correctly populated, share your index definition and I'll be happy to help further.

2
  • Can you tell me what SQLite Client I need to use to see the soup list? The QuerySpec() method is in code so that is not what I'm looking for. Thanks! – stvnhg Feb 28 '14 at 10:53
  • Actually, this has become a bit complicated in the latest version of Mobile SDK because of encryption. I raised this bug on Mobile SDK repo and the dev lead for Mobile SDK responded with the steps required - github.com/forcedotcom/SalesforceMobileSDK-iOS/issues/504 – Gaurav Kheterpal Mar 7 '14 at 10:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.