User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: Back Button Behavior for Android Devices

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    Robotica's Avatar
    Join Date
    Jul 2015
    Location
    Las Vegas, NV and Orange, CA.
    Posts
    263
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Back Button Behavior for Android Devices

    Hello clickers!

    So I went thru and did ALL the dirty work which took another 35 hours or so but I have fixed all the transitions, performance issues, and sound issues... So I am just about ready to finally release this app.

    I have a question regarding Back Button behavior for the Android Runtime. How do you get the application to pop up a native Android question box stating "Do you wish to Quit The Game?" and "Do you wish to go back to Main Menu?"?

    I noticed whenever I just press the Back Button on my Android phone the application just instantly closes and quits... I would like for the user to be prompted before it happening. And on some screens user be prompted before returning to the Main Menu/Title Screen.

    Thanks to EVERYONE on the clickteam forums for helping. I will be including a lot of your names in the Special Thanks section....


    Special Thanks to:

    DaveC, Snail, DavidN, BartekB, Schrodinger, Sumo, Sparckman, MuddyMole, Coldfire, Paobrasil,
    and all the clickteam community

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    Norway
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi.
    Under the properties tab for android there is a checkbox that says "disable default back button behavior"
    If you select that checkbox, then nothing will happen when you press the back button.

    What you can do then is to make your own way of dealing with that button.

    Use the android object, there is an condition that is "On back button pressed"

    From there you can create your own exit dialog, and just use the good old "End Application" to quit the app.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    Robotica's Avatar
    Join Date
    Jul 2015
    Location
    Las Vegas, NV and Orange, CA.
    Posts
    263
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Awesome! Thank you!

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    Robotica's Avatar
    Join Date
    Jul 2015
    Location
    Las Vegas, NV and Orange, CA.
    Posts
    263
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmmm.

    Okay I found the Disable Back Button.

    I see "When Back Button Pressed" and I also see "End Application".

    Where exactly do I click to create the custom dialog box? Thanks!

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    Norway
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi

    You could either use the "Android New Dialog Control v2" extension or you can create your own dialog.

    If you want to create your own dialog, just create a new frame, and add buttons like "Main Menu", "Exit" etc and then just use a sub application to show that frame as a dialog window.

    I have attached an example of both solutions for you, so you can test both out and see which one you would like to use.

    The Dialog Control object is the easiest way of doing this, and it creates a standard android looking dialog window.

    The custom one with sub application allows you to create a dialog option that does whatever you want it to do, and looks the way you want it to do, but it is also harder to make.

    I hope you like the example
    Attached files Attached files

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    Robotica's Avatar
    Join Date
    Jul 2015
    Location
    Las Vegas, NV and Orange, CA.
    Posts
    263
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you so much!

  7. #7
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    Norway
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I hope it helps

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    Robotica's Avatar
    Join Date
    Jul 2015
    Location
    Las Vegas, NV and Orange, CA.
    Posts
    263
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, thank you! Works great with the Dialog Control object!

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    Robotica's Avatar
    Join Date
    Jul 2015
    Location
    Las Vegas, NV and Orange, CA.
    Posts
    263
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just out of curiosity... where did you click to always have a group deactivated?? I noticed your two groups were not listed in black letters... but in dark grey letters. I thought for a few minutes they were activated because when I clicked deactivate then went from dark grey to light grey.... but then I realized they were never activated to begin with... hence why you need to choose one of two boxes "Custom" or "Dialog Object" before testing the frame.

  10. #10
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleFirefly 3D Module
    aenever's Avatar
    Join Date
    Jun 2013
    Posts
    1,554
    Mentioned
    34 Post(s)
    Tagged
    0 Thread(s)
    Right click the group, choose edit from the drop down list and then untick activate when frame starts

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Replies: 0
    Last Post: 5th July 2015, 06:16 PM
  2. Back button?
    By Outcast in forum Android Export Module Version 2.0
    Replies: 11
    Last Post: 13th November 2013, 10:09 PM
  3. Back Button Behavior
    By macca02 in forum Android Export Module Version 2.0
    Replies: 5
    Last Post: 3rd November 2013, 02:29 AM
  4. Button do not resize on different devices!
    By Nellatermica in forum Android Export Module Version 2.0
    Replies: 7
    Last Post: 13th June 2013, 08:36 PM
  5. Using Back button in Android Object
    By Kisguri in forum Android Export Module Version 2.0
    Replies: 21
    Last Post: 12th March 2012, 10:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •