Curtis2291707
Posts: 0
Joined: Fri Jun 27, 2014 6:41 pm

Show a dialog on first startup?

Hi,

Is there any way to show a dialog on the first startup of the app, but never again? I don't want my first time setup window coming up on every launch!

Thanks!

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Show a dialog on first startup?

Hello Curtis,

You may use local storage variable for this purpose, for example. And depending on its value you can show or do not show the dialog. True set by default. And change to false with first start.

Curtis2291707
Posts: 0
Joined: Fri Jun 27, 2014 6:41 pm

Show a dialog on first startup?

Hey Evgene,
Thanks :) also, is there any way to copy and paste elements of the page you're working on?
Thanks!
Curtis

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Show a dialog on first startup?

Hi Curtis,

You can only drag and drop them :)

If you want to use component of the same design on the different pages, save them as Custom and then use wherever you need
http://devcenter.appery.io/documentat...

Curtis2291707
Posts: 0
Joined: Fri Jun 27, 2014 6:41 pm

Show a dialog on first startup?

Hi Alena,

OK, thanks for notifying me.

I can't find a way to place in a statement that would say essentially "if my variable is true, show the setup dialog". Could someone enlighten me?

Thanks, it might be a bit of a stupid question!

Curtis

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Show a dialog on first startup?

Curtis,

Let's say you have page pageName where you open dialog dialogName, to do what you what follow these steps:

  1. On pageName Load event add Run JS action with code
    pre
    localStorage.setItem('forDialog','true');/pre

  2. On dialogName Page show event add Run JS:

    prelocalStorage.setItem('forDialog', 'false');
    /pre

  3. Choose event to open dialog, for example on button click. On PageName page add button.

  4. On button Click event add Run JS with
    preif (localStorage.getItem('forDialog') == 'true') {
    Appery.navigateTo('dialogName', {transition : 'pop'});
    }
    /pre

Curtis2291707
Posts: 0
Joined: Fri Jun 27, 2014 6:41 pm

Show a dialog on first startup?

Hi Alena,

Thanks so much, this worked! Great service from Appery.io, very pleased!

Curtis

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Show a dialog on first startup?

Nice to hear :)

Curtis2291707
Posts: 0
Joined: Fri Jun 27, 2014 6:41 pm

Show a dialog on first startup?

Hey again,

After doing extended testing on a real device, I realised that this code actually makes the dialog come up on every app open rather than just the first one. Any ideas?

Thanks,

Curtis

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Show a dialog on first startup?

Curtis, this definitely can be done with JS, you can search online for more information.
For instance, http://stackoverflow.com/questions/30...

Return to “Issues”