Hi Mark,
There are two things I do in onCreate that may be the cause.
Firstly I retrive some data from a Content Provider as follows:
ContentResolver cr = getContentResolver();
Cursor c = null;
try{
c = cr.query(MySettings.CONTENT_URI, null, null, null, null);
}
catch(RuntimeException e){
e.printStackTrace();
}
try{
if (c.moveToFirst())
{
do {
// Extract the details
checkVersion = c.getString(MySettings.VERSION_COL);
verified = c.getInt(MySettings.VERIFIED_COL);
} while(c.moveToNext());
}
c.close();
}
catch(RuntimeException e){
e.printStackTrace();
}
And then I instanstiate an Object that creates 4 files as follows:
file = new File(FILE_PATH);
testFile = new File(TEST_PATH);
cipherFile = new File(CIPHER_PATH);
decipherFile = new File(DECIPHER_PATH);
I will try to find out if either one is causing the issue, thanks.
On Tue, Oct 12, 2010 at 11:40 AM, Mark Murphy <[email protected]>wrote:
> ANRs are because you are spending too much time on the main
> application thread. If you are doing network I/O, a lot of flash
> writes, or things like that, move that work to a background thread.
>
> On Tue, Oct 12, 2010 at 5:41 AM, [email protected] <[email protected]>
> wrote:
> >
> >
> > I have an Activity that uses a ListView to simply display a list of
> > options for a user to select and when they select an option they are
> > taken to a new Activity.
> >
> > However on occasion the Activity with the options freezes when I try
> > to select one of the options, I get the ANR and in the log cat the
> > following error is displayed:
> >
> > java.lang.RuntimeException: Performing pause of activity that is not
> > resumed:<Activity>
> >
> > Does anyone know what this error means and how to diagnose it?
> >
> > A search brings up very little.
> >
> > Does anyone know what may be causing the error?
> >
> > I can post the code on request
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]<android-developers%[email protected]>
> > For more options, visit this group at
> > http://groups.google.com/group/android-developers?hl=en
> >
>
>
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Android 2.2 Programming Books: http://commonsware.com/books
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en