Disable Default function of "Back" button for Android.

Hi there!
I have tried SO MANY methods to PREVENT the default function of Back button in Android but no success
This is one of the codes I have used with no success:
stage.addEventListener(KeyboardEvent.KEY_UP, optionsKey, false, 0, true);
function optionsKey(ke:KeyboardEvent):void
      if (ke.keyCode == Keyboard.BACK)
            ke.preventDefault();
            ke.stopImmediatePropagation();
          //Do my own code below...
I am using Flash Cs6 , Air 3.2 for Android , Testing it on LG Google nexus 4.
When I use the flash simulator, it works fine! Means the Back Button, let the App go back to previous step (as I expect it to do)
But after I publish the apk (Aspect ratio: Auto , Auto orientation , Render mode: GPU), as soon as I press BACK, it minimize my app!
(means when i press the Back button on my phone, the App minimize down (not close!). when I re-activate it/click on it, I see the app has actually gone one step BACK (as I programmed and expected), but I just CANT STOP the default action of MINIMIZING/De-activating my app after pressing Back button.
Anyone have any "Fla" file that I can see it in ACTION please?!
Because I have used many-many codes and no success yet
thanks and looking forward for your any kind of hlep...
Message was edited by: Pouradam

I got my own answer thanks to myself!!
in above code .KEY_UP should be changed to .KEY_DOWN.
simple!

Similar Messages

  • Disabling of FORWARD and BACK Button of Internet Explorer.......

    Hello everybody,
    Can anyone tell me how to disable the FORWARD and BACK Button of Internet Explorer through JavaScript.......If possible give me the code snippet.....

    Hi
    I I tell you the answer, I suppose it means you'll be able to spend less time on JavaScript and more time on Java, so here goes:
    Open your page in a new window using window.open(...). This JavaScript takes lots of parameters, such as the page you want to display in the window, as well as settings for hiding the toolbar (which includes the forward/back buttons).
    Do a search on the net for window.open for full syntax. I think you can modify the properties of the current window if you want to stay in the same window, but can't remember the syntax.
    Note you can also disable the right mouse button by defining the following function:
    <SCRIPT language="JavaScript">
    <!--
    var message="Right-click disabled!";
    function click(e) {
    if (document.all) {
    if (event.button==2||event.button==3) {
    alert(message);
    return false;
    if (document.layers) {
    if (e.which == 3) {
    alert(message);
    return false;
    if (document.layers) {
    document.captureEvents(Event.MOUSEDOWN);
    document.onmousedown=click;
    // -->
    </SCRIPT>
    I don't know how to stop the user from pressing 'Backspace' unless you use Java to monitor the navigation.
    Hope this helps

  • Forward/ back button for various sub-folders

    Hello all,
    Here's the scenario.....
    I have a forward and back button that load several images in a sub-folder that load to a UIloader....
    next_btn.addEventListener(MouseEvent.CLICK, nextImage);
    function nextImage2(evtObj:MouseEvent):void{
    imageNumber++;
    LargeImageLoader.source = "portfolio/UIloader/bike/00"+imageNumber+".jpg";
    checkNumber();
    back_btn.addEventListener(MouseEvent.CLICK, backImage);
    function backImage2(evtObj:MouseEvent):void{
    imageNumber--;
    LargeImageLoader.source = "portfolio/UIloader/bike/00"+imageNumber+".jpg";
    checkNumber();
    Since I have multiple sub-folders for my portfolio, I was wondering how to apply these same buttons to other sub-folder image paths without needing to create a pair of forward/back buttons for each sub-folder.
    Thanks!

    It's not entirely clear to me, but what I think you need to do for what I think you are saying you want to do would be to make the folder targeting (portfolio/UIloader/bike/, et al) a variable as well.  The only missing link is what you would use to redefine the folders.
    Your next/prev buttons can't be that smart unless you have some conditional logic that helps them realize a particular imageNumber range belongs to a particular folder.  If your images have the same file names (00#.jpg) across the different folders then that won't help.  I believe you would need them to be sequential such that no folder repeats the filenames/numbers of another

  • Disable the default "Start my camera" button for rtc WebcamPublisher

    Hello,
    I notice in the samples that WebCamera displays the cam. Is there an easy way of disabling the "Start my camera" button? I wish to control this from the app itself.
    <rtc:WebCamera width="65%" height="396" id="webCamPub"/>
    I notice in the WebCamera sample that it achieves removing the default "Start my camera" button, by assigning the rtc Webcamera a width and height of 1 and manipulating these through WebCamPublisher class, but I do not see anywhere a "button" = disabled or something similar .

    Ok thanks, overriding the addStartStopBtn function fortunately was a piece of cake for the WebCamera class, and that was all I needed.
    I notice WebCamera is extremely advanced compared to the simpler webcamsuvscriber stuff.
    I try to build on adobe grown material so I can avoid high maintenance costs down the road

  • View State Animations & the Back button (on Android)

    Hello, everyone!
    Is it possible to animate between view states when developing for mobile devices (like Android)?
    And if so (and the bigger question for me), when you transition from one state to another, can you use the Back button on the Android device to transition back to a previous state?

    Hi, Jason,
    First and foremost, thank you for your timely response, and for your well-received advice!
    After reading the posts from the MAX Beta link your provided, it is my understanding that if you disable the default back button handling, that the button itself would no longer function in the application.
    I still want to use the back button, but I want to add the back button's popView function to states as well as Views.
    If I missed anything, please let me know.
    And thank you, once again!
    PS-I don't know if this makes a huge difference, but I'm using the latest pre-released version of Flash Builder 4.5 with AIR 2.6 (released 2 weeks ago).

  • Zoom following use of back button on Android

    Hi,
    On Android Firefox, say I an on a web page and either zoom in using double tap or pinch and then click a link on the page. Firefox displays the page. All good.
    If I then use the back button to return to the previous page, Firefox will not display the page as it was previosly zoomed in. It requires me to either zoom in again by double tap or pinch.
    Is the a setting or add-on that will preserve the zoomed in state after returning to a previous page using the back button?
    Thanks in advance.

    Dito- in the past "the browser resets the zoom and scroll positions when navigating to a new page, and this can happen while the old page is still visible. The old page does not actually reload; it just scrolls to the top before the new page loads."
    The only current bugs I find are: [https://bugzilla.mozilla.org/buglist.cgi?quicksearch=zoom%20reflow&list_id=10103041]
    So, I can recommend filing a bug on this in Firefox for Android Zoom [https://bugzilla.mozilla.org/enter_bug.cgi?product=Firefox%20for%20Android&component=Graphics%2C%20Panning%20and%20Zooming]

  • Back Button for Custom Search Component CRM 7.0 Webui

    Hi Guys,
    I have developed Zworklistsearch component (WEBUI) for the service order header and item level search.
    The component will replace standard worklist search in the worklist Menu (Standard component CRM_BT_TRANSINB).
    The Component is having following parts
    1. Search option (Selection box with option header level search and item level search)
    The search option is binded to the component controller. When the search is loaded the default search type is header.
    2. Search view fields
    BOL objects for both item level and header level search has been created. However both the search views are referring to the same Z structure.
    When the search is loaded default search view is header. The search view is loaded based on the search type selection by triggering outbound plug.
    Both the search views are binded to the same component controller
    3. Saved Search
    Used standard Component SavedSearchRegistration.
    4. Result view
    Both item and header result views BOL objects are created.
    The zworklistsearch object has been replaced with the standard transaction inbox search. However, the problem is with the navigation.
    In case of header search type when I navigate to the service order from the header result view and when I hit back button the search view selection is retained.
    However, in case of Item search type when I navigate to the service order or service order item and when I hit back button the search view selection is not retained.
    The search view loaded on the component is the header search view.
    Also when I execute the saved search, Component is opened in a new window (not in the worklist window). And If I navigate to the service order and hit back button, the worklist view is not displayed.

    Hi,
    Refer to this thread
    You need to write breadcrumb methods.
    [Re: Advanced Search Field Hiding]
    [Re: "Back"-Button History in Z*Window]
    -Satish

  • How to disable browser next and previous buttons for entire ADF application

    Hi,
    JDev Ver : 11.1.1.2.0
    How can I disable the browser navigation buttons next and previous for my entire ADF application.
    If user click on page and then if it press backspace key then it should not go back to the previous opend url and the current page should remain as it is.
    How can I do this ?
    regards,
    devang

    Back button (and backspace) will always go to the previous page. However, with a single master page, the previous page will be the page that called the application so users won't be likely to use it to navigate. The idea of opening the application in a new window/tab is also a nice addition to prevent the back button from being enabled and yes that would block backspace as well. Combine both solutions and you'll have a tab with both back and forward button disabled for the whole application. I don't think there's any document specifically about this solution, but it's not exactly complicated, you seem to already have it actually. Can you precise your question?
    ~ Simon

  • How can i create forward and back buttons for a dreamweaver slideshow?

    Hi
    I am an illustrator attempting to create a website in dreamweaver (basically it will be an online portfolio). I would like to have a box/slideshow with images of my work that someone can browse through by clicking 'next' and 'back' buttons. Does anyone know how to do this? I have been trying to find out how to do this for ages - i dont want to use flash if possible as i am worried about making the site too complicated. I know how to make swap image thumbnails, but i think my site would be more user friendly (and look more professional) if i could have next and back buttons. Would this involve complicated css code (which scares the life out of me!) or is there a relatively easy way to do it? I have got two 'dreamweaver for idiots' books, but neither of them cover this topic. Can anyone help?

    If you are using CS4, there is a Command to create a Web Album... this does it automatically for you.
    Otherwise, you can create this manually.  Say you have 3 pages,
    page1.html  (is the index page of the album)
    page2.html
    page3.html
    Therefore, using ordinary text links
    Home would link to page1.html
    Previous would link to page3.html
    Next would link to page2.html
    You would need to make adjustments naturally to each page as you move along with the gallery pages, changing the previous and the next links as needed.  Below is a a basic example of setting up the links in a simple table structure.  You would also then style the table layout as you see fit - yes, using css preferably  :-)
    <table>
    <tr>
    <td><h2>MY GALLERY OF PHOTOS</h2>
    <a href="page3.html">Previous</a> | <a href="index.html">Home</a> | <a href="page2.html">Next</a>
    </td>
    </tr>
    <tr>
    <td>
    <br>
    <a href="../images/img_2401_jpg.jpg"><img src="../images/img_2401_jpg.jpg" border=0></a><br>
    </td>
    </tr>
    </table>
    Here's an article on creating an album using the DW Command I mentioned earlier. You could create the album and then copy and paste the code into a current page if you've already designed on.,... not too difficult, I just tested it.  You do however, need to have Fireworks to process the images.
    http://livedocs.adobe.com/en_US/Dreamweaver/9.0/help.html?content=WSc78c5058ca073340dcda91 10b1f693f21-7ad1.html
    You could also check out the Lightbox effect which is very popular:
    http://www.lokeshdhakar.com/projects/lightbox2/
    Or do a google search for 'jquery'.  There are different album effects using that framework as well.
    Hope some of this helps  :-)
    Nadia
    Adobe® Community Expert : Dreamweaver
    Unique CSS Templates |Tutorials |SEO Articles
    http://www.DreamweaverResources.com
    Book: Ultimate CSS Reference
    http://www.sitepoint.com/launch/005dfd4/3/133
    http://twitter.com/nadiap

  • How to set default search engine in Firefox for Android?

    Hi. I want to set a non-Google search engine as the default in Firefox on Android. I have installed the search engine as an add-on and it is working fine, but I would like to use it as the default search, rather than having to select it each time.
    Couldn't find the answer on here or anywhere else.
    Please note this only relates to Android.
    Thanks!

    hello eggzzz, are you updated to the latest version? this should now be possible in firefox 23 for android in the addons manager:
    https://blog.mozilla.org/blog/2013/08/06/firefox-for-android-makes-mobile-browsing-faster-easier/

  • How do i have status bar and a back button  for applets?

    I have an applet which displays a set of panels in order. Is there any way that i can have a status bar like in an browser and a back button so that it can go back and go forward. What do i need to do? Is there any sample code to do so. I am new to java and learning.
    Thanks
    Ram

    Status-Bar -- a long thin panel with a long TextField. Perhaps use something from the BorderFactory class to seperate it from other parts of the screen...
    Back Button -- Keep track of your panels in a CardLayout, for example, then use a Button with an action listener that uses the CardLayout's previous() method to move back to the last panel.

  • How to call custom BSP application on click of BACK button for SC in EBP.

    Hi All,
    We are implementing OCI using custom BSP applications.In EBP SC screen ,in step1 (Select Goods/Services), the links for these BSP applications are displayed.
    The user can create a shopping cart using these applications , after the items are transfered from BSP to SC on standard  EBP screen , in step2
    there are four buttons ,
    1)Refresh
    2)Check
    3)Back
    4)Continue.
    We need to call one of our custom BSP applications on click of  this BACK button
    How can i acchieve the same?
    Do i need to make changes in the standard ITS application or thers some other way?
    Thanks,
    Anubhav.
    Edited by: Anubhav Jain on Jul 1, 2008 7:24 AM

    To call a wd abap application from BSP use the method CL_WD_UTILITIES=>CONSTRUCT_WD_URL then just create a link in bsp with the url returned like this:
    <a href="url">Link</a>
    To pass data from wd abap to bsp or vice versa that a look at this blog: /people/koen.labie2/blog/2006/11/29/eating-cookies-with-webdynpro-and-bsp
    regards,
    Fabio Louzada Saito

  • Disable page display when back button is pressed after logout

    hi,
    I dont want the old pages to appear once the back button is pressed after loggin g out. That is .... when logged in, if the user presses back button then his previous pages must be shown....but once the user logs out and then if he presses back button then some message like session has been closed....like message should be displayed.
    Hope you understood the problem

    If you expire a page then back button will not take it to the previous page.
    expire is a HTTP-EQUIV meta tag in the header of the page. You can set the content to some time in the "past" when serving the page first time.
    Expires
    This tells the browser the date and time when the document will be considered "expired." If a user is using Netscape Navigator,
    a request for a document whose time has "expired" will initiate a new network request for the document.
    An illegal Expires date such as "0" is interpreted by the browser as "immediately." Dates must be in the RFC850 format, (GMT format):
    <META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT"> Hope this works for you, there are browser dependencies as well.
    vr,
    Sudhakar B.

  • How to disable or handle the back button in JSF 1.2

    Hi,
    I read an article that JSF 1.2 has fixed the problem with browsers back button.
    I am using modal windows and I want to disable the 'BackSpace' (keyboard button). if user clicks on the back button I want to stay on the current page.
    Any tutorial or any help how to solve this?
    Thanks,
    Varma

    Doubleposted: [http://forums.sun.com/thread.jspa?threadID=5379620&tstart=0]. Please continue over there.
    Please do not use the back button to edit a message. You're going to repost the message. Just use the message's edit button instead.

  • Back button for internal hyperlinks?

    I've created internal hyperlinks with IBA (to other chapters in the text) and for the most part, they work. But there is no back button? Help! And thanks!

    true, IBA books do not have a back better, per se. However, tap on the bookmark icon and you will see a section called "Recenlty viewed". It can be used to navigate back after a user taps on an internal link.

Maybe you are looking for