Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If I press back button on main screen, application should exit to android home screen, but does not exit.
Do I need to do something to enable _drupalgap_back_exit(button) function?
I'm using
drupalgap module 7.x-1.10
SDK 7.x-1.0-rc5 and development snapshot
Android 4.4
Comments
Comment #1
tyler.frankenstein CreditAttribution: tyler.frankenstein commentedPlease look at the drupalgap_back(), _drupalgap_back() and _drupalgap_back_exit() to see how it handles the "onscreen" back button, vs. the Android hardware button. If you're clicking the onscreen back button, then I'm fairly certain it will not exist the app. If you click the hardware back button it should. However, it's up to you to decide when the onscreen back button is visible. Either way, check out those functions, add some debug statements to them and see if you can figure out what is going on please. Make a fork of the SDK on GitHub to get started.
Comment #2
coolman7 CreditAttribution: coolman7 commentedIf I press hardware back button on some different pages of application, application navigates to previous pages as expected.
But If I press hardware back button on home screen of application, it does not exit and stays at home screen of application.
Comment #3
tyler.frankenstein CreditAttribution: tyler.frankenstein commentedComment #4
mfrosch CreditAttribution: mfrosch commentedHey together,
at the beginning I also thought this is not working. But actually you only have to add the dialog Plugin.
If you are using phoneGap Build you can use following line in your config.xml:
<gap:plugin name="org.apache.cordova.dialogs" />
Hope it helps.
Cheers,
Matthias
Comment #5
tyler.frankenstein CreditAttribution: tyler.frankenstein commented