How I Add After 1 Month data Delete System

Hello in my app, users can buy online classes for life time But I do not like it at all, I want that after one month the data of the user for the purchased classes should be deleted automatically

So Please Help Me

How Can I create This System

You can add a component with the clock that when the month after they buy it and the user start the app, the content get delete
What blocks have to tried to use?

Yes, That’s What I was Thinking But I am Able To Set the Blocks For It. It will be Really Helpful if you tell me how should i do that

And This Is my blocks

You can use the timer block inside the clock component. Add 720 hours (1 month). Then add the yellow block (when the timer is done, delete the content) It’s the easiest way I think but it’s not the more secure

1 Like

yes clock component can be ditched by changing device date and time,
initial idea would remain same of adding 720 hours, but the time they purchased the subscription should be stored in Firebase.
And everytime when app is run add 720 hours to time stored in firebase and verify the subscription expiry.

1 Like

The timer will stop after the app closes.

1 Like

Yes but if you compare the time with firebase, it will work

1 Like

So you shouldn’t use timer

1 Like

@WatermelonIce look at this answer

1 Like

This is not from you. Therefore you shouldn’t use timer! Don’t you know you just said the wrong way to do it?

1 Like

I know that this isn’t from me (I have only quote), but the clock can be used like he said in this answer. When the app start, it compares the time on firebase and add 720 hours. Then it see if the month has passed or not

Yes correct. Anyway, I suggest using milliseconds from 1970. Then add 2592000000 (720 hours) and save this to firebase. When app starts compare now and firebase Value using math comparison. This is not the only way, just my suggestion combine with previous posts :blush:

1 Like

Yes it’s other way :blush:

1 Like

Yes i too use the same method as you wrote.
For just ease of understanding i gave him a easier way, which he can improve on.

1 Like

And Firebase Time Value Should be Compared with Online Api Time.
Because as Discussed earlier Clock can be Ditched.

2 Likes

Ups, yes. I didn’t think it… :sweat_smile:

1 Like