Is it safe to load resources during OnUpdate?
Monkey Targets Forums/Android/Is it safe to load resources during OnUpdate?| 
 | ||
| Hello all again. I'm curious to know whether it is safe to load resources in Android apps during the OnUpdate method of a monkey application. Or should all loading of resources (images/sounds) be done only in the OnCreate method? | 
| 
 | ||
| I load only the splash screen during OnCreate, display it immediately in OnRender and load the remaining stuff in OnUpdate. Works great. | 
| 
 | ||
| As soon as your app crashes because it takes to long to load the resources, then you know you will HAVE to load your stuff inside the OnUpdate event. | 
| 
 | ||
| Don't you have to do a check if you've already loaded your resources so you don't load them repetitively? | 
| 
 | ||
| Yes Adam, and for that you could do a ResourceManager class :) | 
| 
 | ||
| Or very simple, use a finite state machine approach. | 
| 
 | ||
| I've uploaded a RessourceManager in the CodeArchives. |