I actually do that in OnCreate, I think this should take care of it.
if (bundle != null && !bundle.isEmpty()) {
gameState = (GameState)
bundle.getParcelable(GameState.class
.getName());
gameState.setState(State.REGULAR);
}
On Jun 29, 11:00 am, Justin Anderson <[email protected]> wrote:
> *> From logcat I can see that the game gets a NullPointerException in
> OnCreate when it tries to read the bundle*
>
> You have to check if the bundle is null before you use
> it.http://developer.android.com/reference/android/app/Activity.html#onCr...)
>
> Thanks,
> Justin Anderson
> MagouyaWare Developerhttp://sites.google.com/site/magouyaware
>
>
>
>
>
>
>
> On Wed, Jun 29, 2011 at 8:39 AM, TreKing <[email protected]> wrote:
> > On Mon, Jun 27, 2011 at 10:18 PM, James Wright <[email protected]>wrote:
>
> >> From logcat I can see that the game gets a NullPointerException
> >> in OnCreate when it tries to read the bundle.
>
> > So what's NULL?
>
> > ---------------------------------------------------------------------------
> > ----------------------
> > TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> > transit tracking app for Android-powered devices
>
> > --
> > 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
--
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