#1 2016-03-20 08:24:02

tin
Member
Registered: 2016-03-20
Posts: 161

suggest new action David.

I test your app builder.It very easy to build mobile app and web app.I use alittle time to learning this app.(Because it easy to use).After I test, I suggest to have 2 action
1.action back I test in android app like back botton in android(like back in browser)
I use javascript to fix this
history.back()
or
history.go(-1)
2.action to confirm exit app in android(ios you cannot exit)

thanks for developed this IDE.

Offline

#2 2016-03-20 13:53:34

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: suggest new action David.

Hello Tin,

Thanks for posting and for your interest in my work at App Builder.

tin wrote:

I test your app builder.It very easy to build mobile app and web app. I use alittle time to learning this app.(Because it easy to use). After I test, I suggest to have 2 action:

1. action back I test in android app like back botton in android (like back in browser)

I use javascript to fix this

history.back()

or

history.go(-1)

What action are you using to show another app's view? If we use the "ReplaceView" action, that certainly override the browser history, which is something we wanted sometimes. But we can also use the "ShowView" action, and, this action put the view into the browser history, then we can use the "back" and "forward" buttons.

tin wrote:

2. action to confirm exit app in android (ios you cannot exit)

I want you to take a look at this forum's thread. Even when we can use certain stuff like "navigator.app.exitApp();", the thruth is this stuff is not official documented into the Apache Cordova documentation. I think we need to consider here the behind operating system and their app's live cycle. Interfer in that cycle maybe it's not a good idea at the end.

Anyway I want to prepare a sample for this question. We can do it using Javascript following this StackOverflow thread, however, some changes must be made in App Builder in order to be ready with the "BackButton" app's event. Right now the program does not send the "event" variable here, then we can't "prevent" the default behaviour. I want to change this as quickly as possible Tin.

tin wrote:

thanks for developed this IDE.

Thanks you for your kindly words Tin.

Offline

#3 2016-03-20 14:12:39

tin
Member
Registered: 2016-03-20
Posts: 161

Re: suggest new action David.

1.yes I use ShowView because Android user have backbutton that can getback to old view with backbutton(if use replace view when press back button it will exit app.)
2.thanks for advice me I will try it by "VarIsUndefined action mainView"(to check view before take action) before take that action.

Offline

#4 2016-03-20 15:16:30

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: suggest new action David.

Hello tin,

The problem with the second question is that currently App Builder do not provide us the appropiate app's variable in order to prevent the default back button behaviour. The next AB release must allow us access to that variable so we can try to implement the StackOverflow solution but using our own app's BackButton event instead to prepare a handler for that using Javascript.

Offline

#5 2016-03-20 18:26:02

tin
Member
Registered: 2016-03-20
Posts: 161

Re: suggest new action David.

the second question,I try to use variable to determine which views that I want the confirm exit app will appear because App builder no event that detect which view is showing now by coding like this in backbutton App action

If "[checkmainview]" "==" "1"
   Confirm "Please, confirm..." "Do you want to continue?" "ConfirmCallback"
Else
    NavigateBack
EndIf

(NavigateBack it's a function call history.back() event)
(ConfirmCallback it's a function call

StartJS
  navigator.app.exitApp();
EndJS

event)

Offline

#6 2016-03-20 18:57:22

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: suggest new action David.

Hello tin,

I am also testing this by myself. In the meanwhile, I don't know if what you wanted is the "[App.CurrentView]" variable, which contains the current app's view? Here more app's global variables.

Offline

#7 2016-03-20 20:43:13

tin
Member
Registered: 2016-03-20
Posts: 161

Re: suggest new action David.

Wow that what I looking for,David [App.CurrentView] I change code to

If "[App.CurrentView]" "==" "MainView"
   Confirm "Please, confirm..." "Do you want to continue?" "ConfirmCallback"
EndIf

NavigateBack

Thanks

Offline

#8 2016-03-20 21:04:23

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: suggest new action David.

Hello tin,

Please, update your App Builder's copy. Between other things, I include a new "ConfirmExit" app sample. This application sample uses the app's "BackButton" event in order to confirm the user wanted to exit our application (using that button).

Certainly I found a bug in the "VarIsTrue" action (and others too, more information into the program's history file) and for that reason maybe you get anoying when try to implement the confirmation by yourself.

Please, take a look at the "ConfirmExit" sample and take a look at the app's "BackButton" event and the "ApplicationExitCallback" app's  function. Hope this sample can be useful for you and others tin.

P.S. Yes; of course use the "[App.CurrentView]" can be also a good thing here.

Offline

#9 2016-03-20 21:45:05

tin
Member
Registered: 2016-03-20
Posts: 161

Re: suggest new action David.

Thanks I test sample work perfectly(the same code)
and how about next release with action navigateback action

history.back()
or
history.go(-1)

thanks David
PS.love to help for a better IDE

Offline

#10 2016-03-20 22:11:09

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: suggest new action David.

Hello tin,

Yes; maybe such actions can be a good idea! Probably the next release count with them. Thanks for the suggestion!

P.S. Of course, in the meanwhile, you know we can use the "StartJS" and "EndJS" actions in this way:

StartJS
  history.back();
EndJS

Offline

#11 2016-03-21 09:01:55

edunt
Member
Registered: 2015-12-21
Posts: 258

Re: suggest new action David.

Hi David,
Big thanks. I have been looking for this action. It is really useful me.

Offline

#12 2016-03-21 18:09:44

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: suggest new action David.

Hello to all,

I publish right now a new AB release which contains a couple of new actions: HistoryBack and HistoryForward, as well a new History app sample. Hope this can be useful for you.

Offline

#13 2016-03-21 19:11:10

tin
Member
Registered: 2016-03-20
Posts: 161

Re: suggest new action David.

Wow very quickly developed!! thanks David
if I have other idea,I will tell you.

Offline

#14 2016-03-21 19:19:18

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: suggest new action David.

Hello,

tin wrote:

Wow very quickly developed!! thanks David
if I have other idea,I will tell you.

Thanks tin!

Offline

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.