Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Nov 2011
    Location
    Quanzhou City , Fujian Province, China
    Posts
    13
    Vote Rating
    0
    liduqun is on a distinguished road

      0  

    Default Sencha Touch 2.1.0 in native app format,how to show a confirm dialog before app exits

    Sencha Touch 2.1.0 in native app format,how to show a confirm dialog before app exits


    I have package touch app to android native app format,I want to show a query dialog before the app will exit,and if the use answer no,I want to abort the quiting process(then the app remaind running).
    How should I do ?
    thanks!

  2. #2
    Sencha - Services Team AndreaCammarata's Avatar
    Join Date
    Jun 2009
    Posts
    1,394
    Vote Rating
    22
    AndreaCammarata has a spectacular aura about AndreaCammarata has a spectacular aura about

      0  

    Default


    I'm sorry but you can't!
    This is not a ST related issue, but you would have the same problem developing a native iOS / Android app.
    Eventually you could detect when an app execution has been set in background mode, but nothing more, if you try to think, have you ever seen an app asking yourself if you really want to quit using an hardware button?

    Hope this helps.
    Sencha Inc
    Andrea Cammarata, Solutions Engineer
    CEO at SIMACS

    @AndreaCammarata
    www.andreacammarata.com
    github: https://github.com/AndreaCammarata

    TUX components bundle for Sencha Touch 2.x.x
    http://www.tux-components.com/


  3. #3
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Berne, Switzerland
    Posts
    714
    Vote Rating
    42
    ingo.hefti has a spectacular aura about ingo.hefti has a spectacular aura about ingo.hefti has a spectacular aura about

      0  

    Default


    Quote Originally Posted by AndreaCammarata View Post
    I'm sorry but you can't!
    This is not a ST related issue, but you would have the same problem developing a native iOS / Android app.
    Eventually you could detect when an app execution has been set in background mode, but nothing more, if you try to think, have you ever seen an app asking yourself if you really want to quit using an hardware button?
    I have to disagree! It may not be possible for iOS (no hw back button), but certainly for Android. Only ST2.1 doesn't have support for the BACK button in a native packaged app. So for the time being one would have to use PhoneGap to do that.

  4. #4
    Sencha - Services Team AndreaCammarata's Avatar
    Join Date
    Jun 2009
    Posts
    1,394
    Vote Rating
    22
    AndreaCammarata has a spectacular aura about AndreaCammarata has a spectacular aura about

      0  

    Default


    Quote Originally Posted by ingo.hefti View Post
    I have to disagree! It may not be possible for iOS (no hw back button), but certainly for Android. Only ST2.1 doesn't have support for the BACK button in a native packaged app. So for the time being one would have to use PhoneGap to do that.
    Then you should have asked:
    "Is it possible to intercept the back button on Android?"

    Don't forget that the user can quit an app using the Home button on Android too and even in this case, it's not possible to intercept the event to display a warning message as you requested.

    The best you can do in this case is intercept the onStop(), onPause() and onDestroy() events to perform some application actions before the app close but this doesn't solve your problem anyway.
    Sencha Inc
    Andrea Cammarata, Solutions Engineer
    CEO at SIMACS

    @AndreaCammarata
    www.andreacammarata.com
    github: https://github.com/AndreaCammarata

    TUX components bundle for Sencha Touch 2.x.x
    http://www.tux-components.com/


  5. #5
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Berne, Switzerland
    Posts
    714
    Vote Rating
    42
    ingo.hefti has a spectacular aura about ingo.hefti has a spectacular aura about ingo.hefti has a spectacular aura about

      0  

    Default


    Quote Originally Posted by AndreaCammarata View Post
    Then you should have asked:
    "Is it possible to intercept the back button on Android?"
    Your point!

    However, being an Android kid, it was quite obvious to me what he was talking about. Because today this is one of the BIG drawbacks for native Android apps done with ST. Android users are so much used to the HARDWARE BACK button that they are constantly using it. And for ST apps that means every time: quit the app... which is real bad!

  6. #6
    Sencha - Services Team AndreaCammarata's Avatar
    Join Date
    Jun 2009
    Posts
    1,394
    Vote Rating
    22
    AndreaCammarata has a spectacular aura about AndreaCammarata has a spectacular aura about

      0  

    Default


    Quote Originally Posted by ingo.hefti View Post
    Your point!

    However, being an Android kid, it was quite obvious to me what he was talking about. Because today this is one of the BIG drawbacks for native Android apps done with ST. Android users are so much used to the HARDWARE BACK button that they are constantly using it. And for ST apps that means every time: quit the app... which is real bad!
    That's your point of view!

    "show a query dialog before the app will exit" !== detect back button

    However, just to be clear:
    - Using the Sencha native, at the moment, is not possible to intercept the back button. You can using PhoneGap.
    - If you want to detect the application exit and display a warning message which avoids the app to close it's impossible using both.
    Sencha Inc
    Andrea Cammarata, Solutions Engineer
    CEO at SIMACS

    @AndreaCammarata
    www.andreacammarata.com
    github: https://github.com/AndreaCammarata

    TUX components bundle for Sencha Touch 2.x.x
    http://www.tux-components.com/