Random Crash in App

by emylyano3 » Thu, 03 Sep 2009 01:39:01 GMT

Sponsored Links
 Hello, im developing a SMS unlocker. Its an app that lets you run a
game as a demo and give the option of unlocking it via sms messaging.
The problem is that im having a chash that occurs unexpectedly and i
suspect that it can be because of the way that im managing the flow
Instead of using different activities for the different interfaces,
and switch between activities each time the user choose an option, I
use just one activity and i set
different layouts.

e.g. main menu -> unlock game, play demo, help, about. If the user
chooses about, a new activity is not created, intead of that i set an
about_layout to
the activity that was already running.
When the user (in about section) chooses back option, i set the
main_menu_layout again.

Im having this problem in the emulator as well as in the phone (HTC
G1 (dream))

What I want to know is if the phone (or emulator) is having any
problem by setting different layouts at any time.

The exact error that Im getting is:
The application XXXX (process com.package.android.XXXX) has stopped
unexpectedly. Please try again.


Other Threads

1. Droid X Screen Protecto

As subject, yang punya monggo ditawarkan :)
Thank you....

Deska Affif
0899-989-GAYA (4292) | Y!: GadgetGaya
www.gadgetgaya.com  |  Bikin Gadgetmu Makin Gaya!

"Indonesian Android Community [id-android]"

PING'S mobile
Email: sa...@pings-mobile.com  Ph. (021) 96087100
Yopie Ratjoen
Email: yo...@ratjoen.com  Ph. 08977726681
Gila original
Email: i...@gilaoriginal.com  Ph. (031) 91555898

Aturan Jual/Kloteran ID-Android  http://goo.gl/azW7

2. activity lifetime and lifetime of instance

hi all

I have a very basic question regarding the lifetime of an instance
when it comes to the activity lifecycle changes.

Lets assume I have an activity that owns an instance of a (custom)
view class. This view instance has an instance x of another class X
(this class stores some application business data). What happens with
this instance x if onStop / onDestroy for the activity are called?
Will the instance be garbage collected and in turn will the
constructor for this instance be called once again when onRestart is
Or will the instance completely remain in memory?

The Snake and LunarLander example store all the application's logical
data directly in the view classes and thus they can simply but the
basic values (integers etc) in a bundle. I've not seen an example
where you have a complexer class with data which you want to
save/recover and how one would do that respectively what you need to
do so that an instance of this complexer class is setup properly (so
that you dont get NullPointerException and all that {*filter*} stuff ;-)).

looking forward to your answers and thanks for the patience with yet
another android newbie ;-)



3. Android API-8 UI Problem misplaced views

4. Widget doesn't work

5. Jersey client with android does not work

6. How to position the dilaog in screen ?

7. Draw on SurfaceView(VideoPlayer) Canvas