Detecting first launch with Tiny DB

I’m trying to make my app detect whether it’s is first launch or not because of ads.

Screenshot_2018-07-08%20Makeroid%20Builder

I’ve done this before, but I forgot and think there should be a topic about this (I searched and found nothing.)

Can anyone come up with something?

This is a question, not a guide.

When Screen1.Initialize
do if [ call Tiny_DB1.GetValue
                     tag = "firstlaunch"
         value if Tag Not There = true ] // if tag not found then get true as default
    then // firstlaunch = true
             // set "firstlaunch" tag to false
    else // firstlaunch = false
2 Likes

@pavi2410 Why did you post this?

My blocks are wrong, they don’t work. I need something as valid as blocks.

Think like those blocks don’t exist in my post and I’m requesting blocks on how to make my app detect a first launch.

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

1 Like

0 = first run? no
1= first run ? yes

1 Like

There is a problem.

The value of the tag “first” here will always be “0” in the if checks.

1 Like

change to blocks queue

blocks%20(2)
first check and next change to 0

1 Like

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)

1 Like

@pavi2410 So, will https://community.makeroid.io/t/detecting-first-launch-with-tiny-db/7340/12?u=turboprogramming (12) work?

Yes

1 Like

@pavi2410 @Yusuf_Deniz Thank you both for helping me, really appreciate it.

1 Like

Screenshot%20(22)

2 Likes

@pavi2410: @hammerhai’s response or @Yusuf_Deniz’s response?

Not to be rude @Yusuf_Deniz but, with your response, the Tag will not stay in the Datastore, however with a variable it will…

@hammerhai’s more preferable because of this

1 Like

Umm, it will.

It actually should be the opposite.

1 Like

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.