Can you also provide the stack for the crash ?

On Friday, 7 September 2012 10:19:42 UTC+3, JPS wrote:
>
> Hi 
> I am developing a live wallpaper and want the preview mode to display a 
> bitmap as opposed to the regular animation in "run" mode.
>
> I know I should use the isPreview() call and all my searches indicate that 
> I should do this in the onCreateEngine() method which is what I did. 
> However I get a nullPointerException. I have tried other locations and the 
> only locations it works are located too far down to perform initialisation.
>
> Any help is Greatly appreciated.
>
> Thanks
>
> JPS
>
>
> @Override
> public Engine onCreateEngine() {
> mEng = new WallpaperEngine();
>
> if (mEng!= null) {
> *if (mEng.isPreview()) { // crash here*
> Log.d(TAG, "preview mode");
> // display preview bitmap
> } else {
> Log.d(TAG, "run mode");
> // perform full initalization
> }
> }
>
> return mEng;
> }
>
>

-- 
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

Reply via email to