Even if we offer a built-in block that detects first launch, we would use this method. However, by using blocks assembled by your own, you can detect N number of launches.
That is True
0 = first run? no
1= first run ? yes
There is a problem.
The value of the tag “first” here will always be “0” in the if checks.
change to blocks queue
first check and next change to 0
You can also use boolean values like this.
Edit: It doesn’t make sense to store value if the tag is there and has same value (false)
@pavi2410 So, will https://community.makeroid.io/t/detecting-first-launch-with-tiny-db/7340/12?u=turboprogramming (12) work?
Yes
Not to be rude @Yusuf_Deniz but, with your response, the Tag will not stay in the Datastore, however with a variable it will…
Umm, it will.
It actually should be the opposite.
That doesnt make sense then because, your device can’t hold a value with a tag that has a text block, it has to find a specific path to store that value, which is the variable.
Umm, let’s think like this. I let my app know that user has disabled ads by purchasing a pack with Tiny DB. And it works fine, until they delete the app and re-install it, as variables will be deleted too.
As you can understand from their names, they are “variables” and they can change easily over time. But Tiny DB stores something that doesn’t change so often.
The same goes with a Text Block, if you were smart enough and thought of storing the value in a txt file that’d be safer. You should read this: Defining Global Variables in Android – Android Research Blog
OK, I have a better solution.
@Makeroid, give us some suggestions about this.