Friday 15 June 2012

android - How to use Toast messages in Andengine Live Wallpaper Service -


I am creating an endangered live wallpaper. The problem is that since I have so many textures, it takes a lot of time to start my wallpaper. How do I reduce this time? Apart from this I want to put a toast message in the ostromus () method so that the user does not have to worry about slow loading. But I think I'm getting a looper.prepare () error while trying to put the toast message on start over again. How do I put a toast message?

  Regium game on public zeroes () {super.onResumeGame (); . GetEngine () Start (); Toast. Maketext (Night SkyWPS service. This, "Loading wallpaper", Toast.LangthaLong). Show (); }   

Error: -

  06-21 08: 08: 37.976: E / End engine (24999): java.lang.RuntimeException: do not Create a handler inside the thread, which is not called Looper.prepare () 06-21 08: 08: 37.976: E / End Engine (24999): On Android.OS.Handler & Lt; Init & gt; (Handler. Java 1121) 06-21 08: 08: 37.976: E / End Engine (24999): Android. On. Tight. & Lt; Init & gt; (Toast. Java: 68) 06-21 08: 08: 37.976: E / End Engine (24999): On Android, widget.Toast.makeText (Toast.java:231) 06-21 August: 08: 37.976: E / AndEngine ( 24999): 06-2l August com.nightsky.lwp.NightSkyLWPService $ 37.run (NightSkyLWPService.java:1232): 08: 37.976: e / AndEngine (24999): 08: 37.976: e / AndEngine (24999): com .nightsky.lwp.NightSkyLWPService.onResumeGame (NightSkyLWPService.java:1235) at com.nightsky on August 06-21. lwp.MyBaseLiveWallpaperService $ 1.onPopulateSceneFinished (MyBaseLiveWallpaperService.java:110) 06-21 august: 08: 37.976: 06-21 E / AndEngine (24999): com.nightsky.lwp.NightSkyLWPService.onPopulateScene (NightSkyLWPService.java:293) August: 08: 37.976: E / Eng (24999): at com.nightsky.lwp MyBase Livewoker service $ 2.onCreateSceneFinished (MyBaseLiveWallpaperService.java:1222) 06-21 08: 08: 37.976: E / End Engine (24999): at com.nightsky.lwp. Nimeski LWPS Service Contet Sisin (Naitskielpispis Java: 116) 06-2l august: 08: 37.976: E / AndEngine (24999): 08: 37.976: E / AndEngine com.nightsky.lwp.MyBaseLiveWallpaperService $ 3.onCreateResourcesFinished (MyBaseLiveWallpaperService.java:135) 06 -21 06-2l august: on August (24999): com.nightsky.lwp.NightSkyLWPService.onCreateResources (NightSkyLWPService.java:104) 08: 37.976: e / AndEngine (24999): com.nightsky.lwp.MyBaseLiveWallpaperService.onCreateGame On (MyBaseLiveWallpaperService. Java: 145) 06-21 08: 08: 37.976: E / Eng (24999): at com.nightsky.lwp. Maybach Livewallpaper Service. Onsfes Created (Maybas Laivvolpeprsewa. Java: 86) 06-21 08: 08: 37.976: E / engine (24999): at org.andengine.opengl.view.EngineRenderer.onSurfaceCreated (EngineRenderer.java:80) 06-21 08: 08: 37.976: e / Andinjin (2499 9): at org.andengine.extension.opengl.GLThread .guardedRun (GLThread.java:210) 06-21 august: 08: 37.976: e / AndEngine (24999): org.andengine    

   
Regulatory Game in Public Zero () {super.onResumeGame (); . GetEngine () Start (); Toast. Make text (getApplicationContext (), "loading wallpaper", toast.lnnhH_LOG). Show (); }

No comments:

Post a Comment