Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Does anyone have an are you Sure you want to exit button on a UX Mobile App?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Does anyone have an are you Sure you want to exit button on a UX Mobile App?

    Hello,

    Id really appreciate if someone can point me in the direction of how to implement an "are you sure you want to exit" button on a mobile UX app build.

    Similar to the following attachment. Thank you

    alldialog2.png

  • #2
    Re: Does anyone have an are you Sure you want to exit button on a UX Mobile App?

    I'm not sure there's enough information here to fully answer this question. Web App? PhoneGap Build App?

    On a native/hybrid app, if you go through the process to minimize and swipe to close an app, there's nothing your app can, or should, do to prevent that.

    Are you talking about the back button on an Android device closing your app?

    Comment


    • #3
      Re: Does anyone have an are you Sure you want to exit button on a UX Mobile App?

      Its using alpha anywhere latest version and a UX component, to build an app to publish up to Phone Gap.

      Having looked at most apps out there. gmail, browsers etc. But yes specifically when the back button is pressed on Android it closes the app.

      However some applications bring up an extra message box pictured above giving the user to stay in the app if pressed incorrectly.

      Comment


      • #4
        Re: Does anyone have an are you Sure you want to exit button on a UX Mobile App?

        Ok... thanks... now you've supplied the details needed. Have a look in the Release Notes... search for Android Back Button

        http://downloads.alphasoftware.com/A...easenotes.html

        Comment


        • #5
          Re: Does anyone have an are you Sure you want to exit button on a UX Mobile App?

          Note that the solution proposed in the release notes only works for PhoneGap. I added it to a test PhoneGap app and was able to get it to ignore the Back button. I wasn't able to follow the example to have it fire another event. This is still new to me. It would be ideal if there was an event property in the IDE to handle the Android Back button and/or some Action JavaScript to assign actions.

          I'm looking for a solution that works in browser mobile apps. I'll let you know if I find a way.

          Comment


          • #6
            Re: Does anyone have an are you Sure you want to exit button on a UX Mobile App?

            Hi Ben,

            This might be a coincidence but I too am struggling with the same issue of the back button being pressed on a Mobile Browser App ( Android devices) by the user who are habituated to go back to the previous section on your app, but instead they kicked out since they are actually going back one page on thier browser history.

            Originally posted by Ben S. View Post
            Note that the solution proposed in the release notes only works for PhoneGap. I added it to a test PhoneGap app and was able to get it to ignore the Back button. I wasn't able to follow the example to have it fire another event. This is still new to me. It would be ideal if there was an event property in the IDE to handle the Android Back button and/or some Action JavaScript to assign actions.

            I'm looking for a solution that works in browser mobile apps. I'll let you know if I find a way.
            I have sent out a request to Selywn and waiting to hear from him. I'll let you know if I find something and would appreciate the same, please.
            KayBee

            Comment


            • #7
              Re: Does anyone have an are you Sure you want to exit button on a UX Mobile App?

              Originally posted by jacsolutions View Post
              Its using alpha anywhere latest version and a UX component, to build an app to publish up to Phone Gap.

              Having looked at most apps out there. gmail, browsers etc. But yes specifically when the back button is pressed on Android it closes the app.

              However some applications bring up an extra message box pictured above giving the user to stay in the app if pressed incorrectly.
              On the latest Marshmallow Android OS,

              When you access GMail via the browser at mail.gmail.com. If you are inside an open email, then the back button on your phone takes you back to the inbox.
              When you access GMail via the Native App, the same thing happens.
              KayBee

              Comment


              • #8
                Re: Does anyone have an are you Sure you want to exit button on a UX Mobile App?

                From testing in mail.google.com in the standard Android browser, I am able to click on an email in my Inbox and see a nice sliding transition to the open message. If I click the hardware back button or the browser back button, it slides back to the inbox. If I click the hamburger icon, a menu gracefully slides in from the left and I'm able to hit the back button to return to the inbox. The same goes for the settings menu. This site is a great example of a web page that feels like an app on mobile.

                I have limited knowledge of the DOM, but I think this works because it is opening a new web page, or at least creating browser history. Would it be possible to configure the Panel Navigator to work this way?

                Comment


                • #9
                  Re: Does anyone have an are you Sure you want to exit button on a UX Mobile App?

                  Originally posted by Ben S. View Post
                  From testing in mail.google.com in the standard Android browser, I am able to click on an email in my Inbox and see a nice sliding transition to the open message. If I click the hardware back button or the browser back button, it slides back to the inbox. If I click the hamburger icon, a menu gracefully slides in from the left and I'm able to hit the back button to return to the inbox. The same goes for the settings menu. This site is a great example of a web page that feels like an app on mobile.

                  I have limited knowledge of the DOM, but I think this works because it is opening a new web page, or at least creating browser history. Would it be possible to configure the Panel Navigator to work this way?
                  I don't think that can happen with AA. On the default android brwosers, the onbeforeunload event does not fire when you press the back button.

                  Well, if you were to sperate out the modules and place a common panel navigator in top of every UX..that might an idea.
                  KayBee

                  Comment


                  • #10
                    Re: Does anyone have an are you Sure you want to exit button on a UX Mobile App?

                    Does anyone else have an answer?

                    Comment


                    • #11
                      Re: Does anyone have an are you Sure you want to exit button on a UX Mobile App?

                      I hope someone can come up with a solution to this problem quick. The users are clicking the back button out of habit. Not only does it cause the obvious problem of data lost having to be re-entered now that the server is SSL the password has to be re-entered each login. It is a real PITA.

                      I don't want to have to use phonegap to disable the back button.

                      I have searched various sites to find a way to disable or capture the back button but nothing I have found so far works on android devices.
                      Win 10 64 Development, Win 7 64 WAS 11-1, 2, Win 10 64 AA-1,2, MySql, dbForge Studio The Best MySQL GUI Tool IMHO. http://www.devart.com/dbforge/mysql/studio/

                      Comment


                      • #12
                        Re: Does anyone have an are you Sure you want to exit button on a UX Mobile App?

                        The topic of the Alpha weekly webinar yesterday was the Android Back Button (though most of the talk was about the PhoneGap Shell v2). Released this week is a new event called onAndroidBackButton. You can find a blurb about it in the release notes (and below). The text says it is for PhoneGap but in the webinar Chris Martin said he thought it might also work in mobile web sites. I requested (via IM) a further explanation during the webinar but the discussion moved back to the PhoneGap Shell. :(
                        UX Component - PhoneGap - Android - onAndroidBackButton - When running in a PhoneGap shell the client-side onAndroidBackButton event will fire when the user taps on the system back button. If you do not define an event handler for this event, then when your app is running and user taps on the Android Back button, your app will exit.

                        If you define a handler for this event, then when the user taps on the Android Back button, the app will not exit and the code in your event handler will execute. You can typically use this event to move to the previous 'state' of your app. For example, if the user had just opened a window, you would close the window.

                        An approach that you might take is to add a new item to a 'stack' every time the user executes an action in your app that should be undone by pressing the back button.

                        Then when the user presses the Back button you can execute the top action on the stack and then pop that action off the stack. When there is nothing left on the stack and the user presses the Back button you can exit the app. To do this your event handler would execute this code.

                        e.event.preventDefault();
                        navigator.app.exitApp();

                        ^^^ I think they need to include code for the stack, along with examples of implementation. It seems like this would be a great opportunity for Action JavaScript.

                        Searching the online documentation for "Android Back" returns no useful matches. Sarah was in the call and said she would be updating the documentation with the release notes. I hope they build a detailed page with lots of examples.

                        I've been asking Alpha Software about the Android Back Button issue since Devcon 2014. I get the feeling that the developers are iOS users and don't experience how frustrating this issue is. A native iOS user testing on Android is not going to have the instinctive muscle reflex to hit the back button, and thus not notice the issue.

                        Yesterday I came across a mobile website for a local restaurant (http://www.azulbarycantina.com/mobile). It is a responsive page that emulated an app, with no browser header/footer. The panels animate (slide) like an app. Pressing the Android Back Button emulats the browser back button and shows me the previous page (with panel animation). How did they do it? Can this behavior be implemented into an Alpha app using properties in the IDE (without hard coding)?

                        The beauty of Alpha is the extensive capabilities that can be configured through properties and without a lot of coding. In my mind, handling the Android Back Button should be implemented in properties of the IDE. If you are an iOS developer and don't know much about this Android issue, you should be able to change a few properties to implement some basic handler for this situation, and let Alpha take care of the rest. Insomuch as wanting to develop applications with Alpha that don't close when the back button is clicked, as a user I don't want to experience this in Alpha applications that are being created by others.

                        I'll get off my soap box now. I hope this doesn't fall on deaf ears.

                        Comment


                        • #13
                          Re: Does anyone have an are you Sure you want to exit button on a UX Mobile App?

                          HI,

                          I have succesfully used this, which I copiend somewhere:

                          OnRenderComplete event I have this definitions:

                          // PhoneGap start up and initialization

                          document.addEventListener('deviceready', function() { // PhoneGap started
                          var platform = device.platform;
                          switch (platform) {
                          case "Android":

                          // back button support
                          document.addEventListener('backbutton', handleBackButton, false);
                          break;
                          case "iOS":
                          if (typeof StatusBar === 'undefined') break;

                          // configure statusbar in iOS 7+
                          StatusBar.overlaysWebView(false);

                          // Light statusbar text color. Use StatusBar.styleDefault() for dark text.
                          StatusBar.styleLightContent();
                          StatusBar.backgroundColorByHexString("#3355AA"); // Hex RGB value, similar to CSS
                          break;
                          }

                          }

                          );

                          THEN ON JavaScipt functions :


                          function handleBackButton(e) { // Android back button event handler
                          // Go through UI items in priority order to do "back" operation

                          // Confirm ending of App
                          msgResult = confirm('<a5:r>Confirm Exit</a5:r>');
                          if ( msgResult )
                          {
                          // Quit
                          e.preventDefault();
                          navigator.app.exitApp();
                          }
                          else return;


                          }

                          Hope this helps,

                          Yours

                          Ari

                          Comment


                          • #14
                            Re: Does anyone have an are you Sure you want to exit button on a UX Mobile App?

                            Ari,

                            Does this only work when the application is wrapped with PhoneGap?

                            Ben

                            Comment


                            • #15
                              Re: Does anyone have an are you Sure you want to exit button on a UX Mobile App?

                              Well, I have used this on Android apps ( phonegap ). Are you talking WebApp ? I do not have no idea how you could override backbutton on WebApp.

                              Comment

                              Working...
                              X