1) When I tilt my phone (Mot Droid), I see the backlight for the menu buttons go on an off like the phone is trying to change orientation. It doesn't actually change orientation but... this sometimes goes along with some catlog stuff about not being able to create the keyboard. I get some reduction in my fps when this is going on. Any idea here? Here is my manifest.
- Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<uses-sdk android:minSdkVersion="3" />
2) I want to overload the back and main buttons (not sure their real names) so that when they are pressed, I pop up a dialog asking if the user really wants to quit. How do I do this?
3) When the app is stopped by a user pressing back (eventually via the exit dialog from (2) above) the app doesn't seem to go away. It stays in the background. Is this expected? How do I kill it if this is even what I want to do? For a game, it doesn't seem like the normal Android lifecycle makes much sense. I think I should just get rid of everything when the app is exited. Thoughts?
4) midi files. I am trying to load one via SoundPool (I guess eventually AudioManager) and I am getting heap overflows when I do this. Why? Doesn't android convert the tiny midi format to an intermediate format. I guess expanding a midi to some kind of real audio format will make it potentially quite large. Does this sound like the issue?
5) For a game, can or should I try to run at a higher priority? It seems like some background services are getting in while my game is running and creating some glitches/garbage collection. Is this normal? Can I mitigate this in any way?
Thanks in advance for any help you can provide.