Questions tagged [application-lifecycle]

It is usually used in enterprise programming contexts where application, session and request scopes (lifecycles) can be distinguished. In this case specific objects (e.g. an EJB if speaking about Java EE) can have different lifecycles according to these scopes managed by the container infrastructure.

221 questions
5
votes
1 answer

How to detect previous Activity when app go to background

I have 2 activities : ActivityA and ActivityB. When application go to background I want to detect which Activity has just been on foreground. For example : Activity A is in foreground -> Click home button -> App go to background onBackground:…
Bulma
  • 990
  • 3
  • 16
  • 35
5
votes
2 answers

How to perform cleanup when application is killed in background?

My application creates some temporary files that I need during its whole lifecycle. I need to dispose of those files eventually, so they don’t take up space on the device. I figured I could delete them when the application quits, but since the…
zoul
  • 102,279
  • 44
  • 260
  • 354
5
votes
1 answer

Fast App resume not working under password lock screen on windows phone 8

I have implemented Fast resume in my windows phone 8 app and its working fine in every case except following scenario. Steps: 1)Phone is password locked 2)Toast is received. 3)Tap on toast. 4)App is activated. 5)The page which was last on backstack…
5
votes
1 answer

Why Application.Exit event works even if handler is async void in WPF application lifecycle?

I have a problem how to await async methods in WPF life-cycle methods (with Caliburn-Micro framework) (eg. OnActivate, OnInitialized, OnExit - which is bound directly to Application.Exit event) This article exactly describes my problem:…
Lukas K
  • 6,037
  • 4
  • 23
  • 31
5
votes
3 answers

Application context gets killed but activity not

I'm working on an application which has a few Activities. One Activity starts the next one. To share some Values I'm using a custom implementation of Application (I'm talking about android.app.Application) called MyApplication. As we all know, the…
joschplusa
  • 1,353
  • 1
  • 13
  • 20
4
votes
2 answers

Dagger 2 and Activity killed

I have an app using Dagger2 The component is instantiated in the onCreate of the Application: @Override public void onCreate() { super.onCreate(); mComponent = DaggerApplicationComponent.builder() .applicationModule(new…
Eselfar
  • 3,759
  • 3
  • 23
  • 43
4
votes
7 answers

Reasonable expectation to support new Operating Systems?

My company has a desktop app originally developed for Windows XP. The original programmer has since been fired (fired with extreme prejudice I might add). I have fixed the app various times but overall try to avoid it, it is a mess and the only…
Neil N
  • 24,862
  • 16
  • 85
  • 145
4
votes
1 answer

Android closing and opening SQLite database in Application level

I have a SQLite database declared and stored at Application level. I handle configuration changes like device rotation, so the closing of the database I set it inside the onDestroy of the MainActivity, but inside an if(this.isFinishing()). The…
XaviGG
  • 171
  • 2
  • 19
4
votes
1 answer

How to make JNI calls from a Service even if application is closed?

I have an app that makes very heavy image processing. My app process very low resolution of the image in the activity and i am intenting to make full resolution image processing in a Service so even if app is closed by user the processing and saving…
4
votes
2 answers

Android: Task or application equivalent of onPause

My application uses a remote service to play audio. I do this so that no activity owns the playback of the audio - the user can trigger some audio to be played from one Activity, and the audio will continue to play as they navigate around the app. …
Rich
  • 36,270
  • 31
  • 115
  • 154
4
votes
2 answers

WP8 app resuming with sensors

In my application on WP8 I work with all of the sensors. Accelerometer, Compass (from Windows.Devices.Sensors and from Microsoft.Devices.Sensors too) and Inclinometer. Everything works fine until I push the Windows button and after that the Back…
Ferenc Kun
  • 428
  • 3
  • 13
4
votes
1 answer

what's android strategy when the device battery is low?

I would like to know what modules android "shutting down", and in which order, when the device battery is low. I'm interested specially in case like this: let's say my application is running, and in forground. now I'm launching intent to start…
Tal Kanel
  • 10,475
  • 10
  • 60
  • 98
4
votes
3 answers

Android Application life cycle and singelton

well most of us familiar with this pattern: public class MySingeltone { public String mSomeReferenceTypeData; public int mSomeValueTypeData; private static MySingeltone mInstance; private MySingeltone() { } public…
Tal Kanel
  • 10,475
  • 10
  • 60
  • 98
4
votes
1 answer

Coming back from suspended state - iOS

When my app comes back from a suspended state is behaving in a very strange way, so I would like to restart it from scratch in this situation. But I don't want to restart it every time it enters the background and comes back to the foreground. Is it…
Abramodj
  • 5,709
  • 9
  • 49
  • 75
4
votes
2 answers

exit entire app at once

I have used the code from here in my app, when I click on 'Cancel' option ,the app just minimizes ,when I long press and hold Home button and select the app.It shows the same screen not the splashscreen or the usual way the app starts - So I am…
Jason Wood
  • 737
  • 1
  • 13
  • 22
1 2
3
14 15