wanted my presentation slides to appear only once when the app is installed?

Asked

Viewed 42 times

0

i would like that when the user finished going through the slides of my app would automatically open a new Activity and the slides were destroyed so that they would not appear anymore they would appear only when the app was installed again if someone knew of some method? below goes the code I’m usinginserir a descrição da imagem aqui

  • Welcome to [en.so]! Please click on [Edit] and put the code as text. Putting it as an image is not ideal, understand the reasons reading the FAQ.

1 answer

0

Ideal is that Voce uses Sharedpreferences for this. When entering the slide screen, Voce should save an "ECRA_TAL_FOI_ABERTO" flag as true. And when entering the app, you should check if this flag exists.

Boolean b = verificarSeExisteAFlag()
if(b){
    vaiParaEcraPrincipal()
}else{
    vaiParaEcraDeSlides()
}

When entering the slides:

salvarFlag(true)

Shared preferences are stored while the app is installed. And removed when the app is unlocked.

References

https://developer.android.com/reference/android/content/SharedPreferences

Browser other questions tagged

You are not signed in. Login or sign up in order to post.