AS3 is there an event for when Android app is exiting on it's own?

Ok, I made an app for Android. And when we push the middle button or back(lefthandside) button of Android phone, we all know that Android apps still runs in the background.
So my code is this:
the first line(addEventListener) is in a private function which runs as soon as you open the app.
    NativeApplication.nativeApplication.addEventListener(flash.events.Event.EXITING, onMyAppExit)
    private function onMyAppExit(event:flash.events.Event):void{
      trace("onMyAppExit is running");
      saveProgress();
Basically, I want saveProgress() to run when the app ACTUALLY exits from running in the background. I noticed that my app actually exits when I open another app like Candy Crush. I guess the Android OS exits apps automatically when the apps are not being used and when the app you are using takes a lot of RAM. However, my code only works when I run my app in AIR Debug Launcher(Mobile). I know that because I see the trace in the function in my output window when I click on the x button on the right corner of the app window. But when I connect my Android phone to the computer and then ---> AIR3.8 for Android settings ---> Publish, and then I "Begin Remote Debug Session", and on my Android phone, I open my app first, then open Candy Crush so that the Android OS automatically exits my app, I don't see the trace. So I finalized that the code didn't work on my phone.

i tried this too. but doesn't work
'(event:Event)'
private function onMyAppExit(event:Event):void{
and 'stage'
stage.nativeApplication.addEventListener(Event.CLOSING,onMyAppExit);

Similar Messages

  • Is there any event in windows universal app (wp8.1&win8.1) that fires when screen locked and unlocked with in the app?

    Hi All,
    Is there any event in windows universal app (wp8.1&win8.1) that fires when screen locked and unlocked with in the app
    Right now, I am using this below mentioned event
    Window.Current.VisibilityChanged +=
    CurrentWindow_VisibilityChanged;, but it fires even when app relaunches.
    Please anybody help me to solve this issue.

    Thanks for your early reply. but, those are system triggers used in background task. I want an event that fires when screen gets locked. like this...(a networkstatuschangedevent)
    NetworkStatusChangedEventHandler
    networkStatusCallback =
    newNetworkStatusChangedEventHandler(OnNetworkStatusChange);

  • Is there an event for a composite has a new child control?

    I want to know is there an event for a composite has a new child control?
    For example,
    Composite parent = new Composite();
    Label child = new Label(parent, SWT.None);
    I want to know the parent composite is getting a child label when new label
    create then immediately.
    Thanks.
    Frank

    Also, I got this comment (a bit of a warning) from Dimitri:
    <blockquote>I just saw this pattern used by <i>[customer]</i> - they (used to check) if the member was senior, and if it was, it was responsible for some periodic cleanup tasks and whatnot.
    This worked fine in the test application and broke immediately when we added dedicated cache servers, or standalone JMX console etc, i.e. it is perfectly possible for the Console to be senior without any application classes in it's classpath, or for the dedicated cache server to be senior and only application servers have logic in place to run stuff.</blockquote>
    In other words, depending on your deployment, it may not be as simple as just "being senior", you may also want to use a "Role Name" for example (configurable and accessible per member).
    Peace,
    Cameron Purdy
    Oracle Coherence: Data Grid for Java and .NET

  • Z10 - No Data Network Connection for Several Android Apps

    Hi,
    I'm using freshly installed 10.2.1.2102 software on a BlackBerry Z10 (STL100-3).
    Everything runs smoothly except for several Android Apps dwnloaded from Snap or Onemobile.  They work perfectly fine over WiFi but not at all over Data.  Does anyone know why or if there is a solution? It's pretty frustrating.
    Examples include, NetFlix, MyFitnesspal, Amazon Price Check Urbanspoon, etc.
    Thanks for any replies.

    you can hard restart you device. and try again
    Ades Ganteng

  • Dreamweaver and PhoneGap: How to Edit the Application Manifest for an Android app

    I successfully created an Android app using dreamweaver cs6 and the PhoneGap build service.  I submitted the app and it is live in Google Play.  The only problem is that the app is requiring all kinds of permissions from users that are not necessary for the app.  The app requires Internet access, but it does not require access to the camera or the user's contacts, etc.  I understand that this information is held in the Application Manifest file, but I don't know where that file is.
    Can you help me figure out how to edit the Application Manifest file for my android app?
    Thanks,
    Michael

    To edit permissions, you do so in the config.xml file. After making changes, you can directly upload on build.phonegap.com or from within Dreamweaver.
    See this page for info on customizing config.xml: https://build.phonegap.com/docs/config-xml#features

  • Is there a sound for when your ipads stops charging?

    I want something like when it starts charging but for when it stops because it got disconnected from power source

    No there is no sound availble for when your ipad gets disconnected.
    The only notecible diffrence is the chargin icon on the top right of your screen and if it's in sleep mode the screen will pop on

  • How do I change the Version Code in the Flash Android settings for the Android app Market?

    I recently tried to update my app in the Android app market and when I uploaded it I got the following message:
    "The new apk's versionCode (1000000) already exists."
    In the Flash Adnroid settings I changed the version label but that did not help.
    So I have two questions:
    How do I change the Version code in the Flash Android settings? I changed the version number and version label but that did not work.
    What is the difference between the version number and version label?

    I tried that but it did not work. Apparently there is a difference between the version code and version number (which is set in the Android settings). From my research the version label is optional, so there are no problems there.
    This is the what the XML file says:
    <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
    <application xmlns="http://ns.adobe.com/air/application/2.6">
      <id>com.company.nameofapp</id>
    //Below is the correct version number, but has no relation to the version code.
      <versionNumber>1.1.0</versionNumber>
      <versionLabel>NewLayout</versionLabel>
      <filename>Name of app</filename>
      <description/>
    I did find this piece of information for Androin version codes. (http://developer.android.com/guide/publishing/versioning.html)  But I don't know how to place it into the xml file without conflicting with other code.
    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.example.package.name"
          android:versionCode="2"
          android:versionName="1.1">
        <application android:icon="@drawable/icon" android:label="@string/app_name">
        </application>
    </manifest>
    Any other thoughts are much appreciated.

  • Autostart camera for mobile android app

    Hi
    an augmented reality app working fine in my desktop but I have convert that to android app. I need when user open this app it autostart camera of mobile because user can't run this app without camera. how can i do this..?

    Am still waiting. Anyone out there who got new info on this?
    I am also wondering if it will be part of the creative cloud I already pay for on a monthly basis.

  • How do I make a Splash Screen for my Android App.

    Hello, I am currently making an app, for school and cant find out how to make a Splash Screen. I'm using Flash Builder 4.7 and can only find tutorials for 4.5. I just need it so that when the app opens there is not a white screen forever while its loading up, any help would be great.
    Thanks!

    Copy into Apple Pages. Export a PDF.

  • Can i use JEE server for my Android app?

    Hello,
    Let me introduce myself,i am Mohith K M from India,Student and beginner in JEE
    I am doing a project,Which is combination of Android application,Server and Desktop app (developed in Visual C# )
    I am comfortable with Android app side,
    Bt, i dont have an idea About j2ee Server side?
    Where should i start studying
    What protocol should i use? SOAP?
    Wat my project exactly do is
    There are many Desktop application (devlpd in visual C#),These app will have database,and these is to be updated to Database @ server side, (MYSQL??)
    and Android application will request with some query to J2ee Server;Now J2ee Server have to respond back,after applying some bussiness logic in b'wn
    Please help me out,Where should i Start!
    I was planing to use Glassfish server,j2ee;

    You learn the same things as you would learn for any JEE application;
    - learn about EJBs (3.0 standard, not the earlier iterations!)
    - learn JPA (optionally, low level JDBC can also work fine)
    - learn about EJB webservices (and it might not hurt to learn about SOAP in general)
    You shouldn't need a web interface as this is all server side, so you don't need to go into JSF or any other web framework. For your purposes, I can recommend the book "Enterprise Javabeans 3.0" by O'Reilly. It will teach you all you need to know. If you want to learn about JPA, I can highly recommend the book "Pro EJB 3: Java Persistence API" by APress.

  • Creating Help for Iphone/Android app

    I need to create help for an iPhone and Android app using RoboHelp 10. 
    Which option do I choose for a New Project: Blank Project or Application Help?
    And, which output do I choose under "File > Generate"? I see an option for "Native Mobile App." But, I'm not seeing a "Multiscreen HTML5" option.
    Which file do I give the developer?
    Thanks for your help!

    That's a pretty big question and you haven't given us any clues such as which version of RoboHelp you are using and whether it is just this form of help that is new to you or help in general.
    It doesn't really matter whether you choose Blank Project or Application Help as they are just starters with different default topics and you will be trashing them anyway. For now let's say start with Blank Project and create your topics. You do need to keep in mind they will be viewed on various devices. More about that later.
    When that is done you start thinking about creating a suitable output. Multiscreen HTML5 is the output in RoboHelp 10. RoboHelp 11 was released today and that has a new output, Responsive HTML5. That is simpler, especially first time out. Both of those types are intended for use where they will be viewed via a browser, be that on a desktop or a mobile device.
    It is not clear whether you want your company's app to access help in that way or whether the need is for the help to be an app in its own right. The latter adds another layer of learning. Essentially after creating an HTML5 output, you use the script to create an app. From the questions you ask, I suspect you will need developer assistance with that.
    Start by viewing my page at http://www.grainge.org/pages/authoring/html5/html5.htm where you can download a project with information inside, include some ideas about how to write content.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Looking for a good note taking app: Are there new features for the Notes app in iOS6?

    Hi,
    I've read that the Notes app with Mountain Lion will be available for OS X as well, and I was wondering if there will be any significant updates to the Notes app coming in iOS 6?
    The Notes app in Mountain Lion supports, as far as I know, text formatting, images and attachments. The Notes app in iOS 5 does not have any of these features, yet still it is claimed that the OS X client will sync with the iPhone, iPad and iPod touch. This means that there must be some rather significant updates coming for the Notes app in iOS 6 to match up with the features of its Mac counterpart. Still, no updates to the Notes app are listed in any of the iOS 6 feature lists I've seen so far.
    I'm looking for a good note taking app for OS X and iOS. I don't like how Springpad works, neither did Evernote work out for me, it's just too complex - I like Simplenote a lot though, it's just that its approach is too radical in my opinion. I was thinking that the Mountain Lion Notes app might be a good alternative because it combines simplicity with rich text formatting and attachments. I kind of hate the skeuomorphic user interface though.
    best, Ian

    You are only addressing other iPad users here & no Apple employees. We have no way of knowing, so you'll have to wait until iOS 6 is released.
    Here's some general info.
    Working with Notes and Documents on the iPad – Alternatives & Suggestions
    http://ipadacademy.com/2012/04/working-with-notes-and-documents-on-the-ipad-alte rnatives-suggestions
     Cheers, Tom

  • Is there a tutorial for the iMovies App for the iPhone?

    I cannot figure out all of the features and things that are not there that make to have. In other words, it's not all intuitive. Does anyone have some good tutorial for us to use? Also, is this app it? I mean, are there other features or plug-in's or extensions that I can buy to get more transitions, themes, etc.? How do I fade the audio on the music and get more that 1 song track on there? Can I add a specific song to each video clip? Is there a way to put some text in the middle of clip or just at the end without having a completely different clip? Maybe I am asking too much, but any help would be appreciated. Thanks.

    Thanks for the good info. I think I was hoping for a few more features, even though it is pretty nice for a phone app. It would be nice to some additional granularity of control and more options for themes and transitions. Maybe, Apple will consider that as another version/pro version of iMovies/or add-on... hint, hint... wink, wink... nudge, nudge... know what I mean, know what I mean, eh?!?! Yes, that was a reference to Monty Python!
    Message was edited by: riversen

  • No internet connection for some android apps l

    I m using BlackBerry z10, nd I ve issues with some android apps like line, tru caller, and other some apps, my internet plan is activated but internet is connecting with these android apps, it was working properly untill I updated the latest software version of phone, plz tell me good solution..urgenttt

    Do you get an error message when you try to connect to the router?

  • HTML Banner for Native Android App Builder

    In the release notes it says
    The HTML banner in the library has limited available APIs.
    I don't even see a place in the app builder to define a banner.
    We called Gold Support and they don't know anything about the new Native App Builder.
    Thanks,
    Darrin

    I know that with Android the subscriptions are not supported but a header banner (static - no action linked) is important to see!
    Client want a branded viewer - now is very poor!
    Are there some news about this? Now i'm working with the new native Android app and i see that in the web builder (works very well!) there is not a field to upload a png. V31, V32?
    I use Professional

Maybe you are looking for

  • FBL5N open items not appeared for clearing in F-32

    Hi all, I was trying to clear 2 open items whcih are getting displayed in FBL5N report with opposite signs and equal amounts.  But when I am trying to clear those two transactions in F-32, I am able to see only 1 items instead fo two. Both transactio

  • Collection compilation erroe

    I am using a process which creates and loads and then updates 2 collections. The very last step in 100 or so lines of code before an end loop/end is this line: APEX_COLLECTION.UPDATE_MEMBER_ATTRIBUTE (tip, seqnum, days, thetip); which gives this erro

  • Can we complete a workitem when it is still under "execution"?

    I have one task in my gui inbox(SBWP), when I try to execute it(Click the execute button) I found it locked the workitem(From transaction SM12) in my terms at once, now if I try to complete the workitem with one "Event" in my application, I found the

  • Error running an interactive form example

    Hi everyone, I'm trying to run a basic AIF scenario on a local machine. I created a web dynypro example according to the Guide "How to Create Online and Offline Forms in Web Dynpro". I configured the Adobe Document Services and my credential as descr

  • No record fond in JSP

    Hi I have writen JSP application wherein the consumers give there number and can get details related to them.In case consumer is not existent , the application should show login.jsp again. How can I get it done without writting two select statements