Log in or register to post comments

save some values even when the user exit the application

February 28, 2013 - 11:06am #4

hi, i want to make an AR game, and this is the description of my game:

the user will have to search the trakable in one area. each trackable will give some scores. the user will get a reward if his score is bigger than the score that we specify before.

i wondering something, can we save the score value even when the user exit the application? for example, the user suddenly got bored and want to exit the app, but he want to play it in another minutes and don't want the score back to zero again. how can i do that?

save some values even when the user exit the application

February 28, 2013 - 11:16am #3

Hi, yes, you can save information such as the player score, current game level and anything you can imagine in a typical game; and you can read them back when you restart the game;

there are many ways of doing it;

in my experience, for simple types of data like that, the easiest appraoch is to use the so called "Shared Preferences";

However, for more details about this, you can have a look here (as this question does not really related to Vuforia):

http://developer.android.com/guide/topics/data/data-storage.html

There you can find all the details to achieve that.

 

save some values even when the user exit the application

February 28, 2013 - 7:02pm #2

sorry if this post was out of topic for vuforia.. but thank you for the reference :D i will read it first.. maybe if i had another problem i will post here...

save some values even when the user exit the application

March 1, 2013 - 1:00am #1

No problem, just post here if you have any issues with Vuforia.

Log in or register to post comments