App crashes when you start it up whilst in airplane mode

Bug #622511 reported by Chris Wayne
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pdnet.android
Fix Released
Critical
Unassigned

Bug Description

When testing on my actual phone, opening up the app while in airplane mode crashes the app immediately. When the app had already been opened, this doesn't happen

Revision history for this message
Chris Wayne (cwayne) wrote :

This can be fixed by having a try/catch in onCreate for PDBrains.java but sometimes that gets all.... weird looking (it messed up the background but only sometimes?)

Next ill try and do an isOnline() type deal, then if true, then go on, otherwise just display the you dont have internets thing

Chris Wayne (cwayne)
Changed in pdnet.android:
status: Confirmed → In Progress
Revision history for this message
Nick Pettazzoni (pettazz) wrote :

whilst.

Revision history for this message
Chris Wayne (cwayne) wrote :

Tried a different isOnline() that some kid was talking about in StackOverflow:

    public boolean isOnline() {
     ConnectivityManager conMgr = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);
     boolean connected = ( conMgr.getActiveNetworkInfo() != null &&
                conMgr.getActiveNetworkInfo().isAvailable() &&
                conMgr.getActiveNetworkInfo().isConnected() );
     return connected;
    }

This didn't seem to work so well, we can go back to it later, but the try{}catch{} works for the most part, not sure what that graphics distortion was...

Revision history for this message
Chris Wayne (cwayne) wrote :

Fixed in revision 202

Changed in pdnet.android:
status: In Progress → Fix Committed
Chris Wayne (cwayne)
Changed in pdnet.android:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.