Note that there are some explanatory texts on larger screens.

plurals
  1. POApplication going into ANR mode
    text
    copied!<p>When the users presses the back button in my application. Here is the scenario:</p> <ol> <li>User starts the application - Activity shows up </li> <li>User presses back button</li> <li>User re-starts the application. <strong>At this point application just shows a blank screen, none of the buttons(home/back) respond, after some time Force-close dialog comes up.</strong><br> NOTE: If the user presses "Home" and then relaunches the app, this doesn't happen, only if the user presses "Back" and then relaunches it.</li> </ol> <p>In my onCreate() I have some network setup code. However, onDestroy() has the corresponding cleanup code, so I don't understand why this is happening.</p> <pre><code>@Override public void onCreate(Bundle savedInstanceState) { Log.d(DEBUG_TAG, "onCreate()"); super.onCreate(savedInstanceState); setContentView(R.layout.main); // Aquire the multicast lock // Create an instance of JmDNS // Add a listener for Bonjour services of a given type } @Override protected void onDestroy() { Log.d(DEBUG_TAG, "onDestroy()"); // Remove the services listener // Set the reference to JmDNS instance null // Release the multicast lock super.onDestroy(); } </code></pre> <p>Not sure what is going on, and don't know how to debug this.</p> <p>Interestingly - <a href="http://melloware.com/products/zeroconf/" rel="nofollow">"Zeroconf Browser"</a> a popular app that I downloaded from Android Market to use to debug mine - seems to have the same issue.</p> <p>EDIT: Changed the code from onStart()/onStop() to onCreate()/onDestroy(). Same problem as before.</p> <p>EDIT: For anyone who runs in a similar problem, this is what was causing my misery. Android code wasn't the culprit: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=2933183&amp;group_id=93852&amp;atid=605791" rel="nofollow">http://sourceforge.net/tracker/index.php?func=detail&amp;aid=2933183&amp;group_id=93852&amp;atid=605791</a> </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload