-
Vincent
android android-asynctask lifecycle
I have an activity in which I collect data for an online transaction. When the collection is done, I run a background thread (more specifically an AsyncTask) that calls a web-service and waits for its response, then return it to the activity. Meanwhile, a progress dialog shows up.I want the background process to be cancelled if the application finishes or user cancels (however, I still need to notify the web-service), and retained if the activity is destroyed due to a configuration change or to
-
William Gross
asp.net lifecycle httpapplication
I want to know which parts of the ASP.NET request life cycle happen after an error is handled via the HttpApplication.Error event. Specifically, which of the events listed at http://msdn.microsoft.com/en-us/library/bb470252.aspx#Stages fire after an error? I know that EndRequest still fires, and I suspect that PreSendRequestHeaders and PreSendRequestContent fire as well, but aside from these I have no idea.Does it depend on when in the life cycle the error occurs? Does it depend on whether I cal
-
Jonas
android gps lifecycle toast locationlistener
I have a simple locationListener that is using GPS only to start. Inside OnLocationChanged I do a geocode lookup and display a Toast message. The problem is once the activity is no longer in front the gps is still receiving updates and processing the Toasto. I have RemoveUpdates in onStart, onPause, onDestroy and onStop.Any idea why I can’t get this service to stop?public void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.main);mapView = (MapV
-
Radon8472
android exception-handling crash lifecycle
I like to collect all crash reports in my android app, and send it to my own server. So extended the UncaughtExceptionHandler to deliver the reports via http to my webserver with informations fron this article UncaughtExceptionHandler not catching some exceptions. I added my class to my first Activity in the onCreate method like this:public void onCreate( Bundle savedInstanceState ) {// …Thread.setDefaultUncaughtExceptionHandler(new HttpFormExceptionHandler(this));// … }This code works as e
-
Albus Dumbledore
java multithreading lifecycle main-method
When does a typical Java app finish?If I start a new thread in the main method and then the main method finishes, but the other thread continues working, the app would still be on until all it’s threads have died, wouldn’t it?Thanks & Merry Christmas!
-
RIAstar
flex components spark lifecycle
I have recently migrated some of my projects to the shiny new Flex 4.6 SDK. I wasn’t expecting much trouble since it was only a minor release. But as a matter of fact I got hundreds of errors all over the place. These errors would mostly come from Spark SkinnableComponents; for example:override protected function getCurrentSkinState():String {return mySkinPart.someProperty ? “normal” : “someOtherState”; }would work just fine under 4.5, but would throw me a nullpointer error in 4.6. The reason is
-
Angrezy
maven-2 maven-plugin lifecycle mojo plexus
I am trying to test a simple custom plugin with custom lifecycle.Here is my EchoMojo.java file:package org.sonatype.mavenbook.plugins; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; /** * Echos an object string to the output screen. * @goal echo * @execute lifecycle=”custom-echo” phase=”package” */ public class EchoMojo extends AbstractMojo { /** * Any Object to print out. * @parameter expre