When you create a button keep the flag of it and when you reopen your app just check that flag. If it matches your condition create a button which you want.
When you create a button keep the flag of it and when you reopen your app just check that flag. If it matches your condition create a button which you want.