Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 671
Registered: ‎03-21-2012
My Device: BlackBerry PlayBook 16GB
My Carrier: Vip
Accepted Solution

How to check when Qt app is run for the very first time ?

How to check when Qt app is run for the very first time ? I need it for creating trial version of my app. Any help is greatly appreciated Smiley Happy

Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: How to check when Qt app is run for the very first time ?

Probably use data folder and put some file I_ran_at_least_one_time and check for its existance. This folder is not accessible to user and is not changed even if you upgrade the app.

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: How to check when Qt app is run for the very first time ?

You can store a file in the app's directory (not accessible by user) with needed information (e.g. XML holding first run date/time). However, if the user deletes the app, so will the file. You could put the file somewhere in the shared directory, but then it is user accessible and makes a mess of the file system. You could do a "phone home" and keep the start date/time in a database on your server (by device id), but then you need the device connected to the Internet. Would be nice if there were some App World APIs that that app could query about itself
Developer
Posts: 671
Registered: ‎03-21-2012
My Device: BlackBerry PlayBook 16GB
My Carrier: Vip

Re: How to check when Qt app is run for the very first time ?

[ Edited ]

Well, I'll try with file, even if it's not the best option. Server check is too much for this app.

 

And, does Qt have something like Android's SharedPreferences ? QSettings maybe ?