Hello Mike and Mark,

Thank you for the very helpful replies!  I will start to try and catch
any uncaught exceptions and see if helpful data comes out.  I will
also make sure to implement proper life cycle management of my
activities.

The problem seems unlikely to be memory since the problem occurs as
soon as a user seems to click on the button that launches the editNote
activity from the main activity.  It still really baffles me given
that is a very basic program and is just a simple listView main
activity that calls an edit activity on a basic database entry.

I also agree with the importance of having a test device, but this
will become increasingly difficult as more and more devices with
Android get rolled out so I hope to have the emulator to be as
accurate as possible.

Thank you again and if you have any other ideas to try as I implement
these would be greatly appreciated!

Cheers,
Tom

On Jun 4, 9:30 am, Mike <[email protected]> wrote:
> Hi Tom,
>
> Emulators are great for "happy path" testing, meaning they quickly
> allow you to test your program without a real device.  But don't
> confuse this for how your users are gonna thrash your game on a real
> phone in their real worlds.  :)
>
> A couple of things you won't be able test very well on an emulator:
>
> 1) Orientation changes
> Changing the phone's orientation destroys and recreates the currently
> displayed view.  Your users will change orientations at will when they
> need to type something (at least prior to the 1.5 on screen
> keyboard.)  If your app is in the foreground, this destroys your
> current activity and creates a new one.
>
> 2) Low Memory Conditions
> The Android Java VM will do whatever it can to keep the foreground
> process (the one with the UI focus) responsive.  To this end, it will
> need to start freeing up resources from other apps when needed, and,
> in rare instances, will kill background apps.  This is where I ran
> into most of my problems with my game.  I didn't account for users
> doing normal things like bringing an app up, using it for a bit,
> pressing the home button, going somewhere else, maybe even putting
> their phone to sleep for a while and then coming back to your app
> later.  You'll need to plan for this!  If you haven't already done so,
> study this backwards and forwards and memorize 
> it:http://developer.android.com/reference/android/app/Activity.html#Acti...
>
> 3) Forcing Android to terminate your app and relaunch it (yes, Android
> really does do this sometimes)
> Do you have any background threads running that assume certain
> resources are around that may have been cleaned up while your app was
> in the background?  Make sure that all the code you need to initialize
> your app gets properly called in the case where your app gets killed,
> but Android launches the activity that was last on the top of the
> stack.
>
> Hope this helps,
>
> - Mike
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to