First of all, I am very much a beginner working on my first app, and I
am stuck on  a problem. My app uses GPS and TTS and is intended for
use when I am skiing. It has a single screen which displays speed,
odometer, altitude, and GPS coordinates. It also uses TTS to speak
speed, odometer, altitude, and time at user selected intervals. I have
it typically set to speak speed at 5mph intervals. So whenever the
speed crosses 5mph, 10,mph, 15mph, etc either on the way up or down,
the speed is spoken. Similarly, odomenter is spoken every mile,
altitude every 1000ft, and time every quarter hour. It is implemented
as a single activity and built for API level 8. The target device is a
Samsung YP-G70CW MP3 player which runs Froyo 2.2.2. Everything works
as intended when the screen is on. However, the behavior is not
consistent with the screen off (the primary use mode), either by
timeout or directly with the power button. Sometimes the TTS reporting
continues to work fine just as with the screen on. More likely, it
runs at a reduced rate where the odometer and time reports occur on
time, but the speed reports are much less frequent than normal and are
delayed. When the screen goes off, it will get into one of these two
modes and then stay that way. When in the "slow" mode, if I turn the
screen back on, it speeds up to normal. I have diagnostic TTS reports,
"pausing" in the onPause override, and "resuming" in the onResume
override, so I can hear that it pauses when the screen goes off. Now
my many questions:
1. My app is paused, but it continues to run, either at full or
partial speed. So what does it mean for an app to be paused? Is it
reasonable to implement this kind of app as an activity, or is a
service required?
2. What all happens when the screen goes off? The Android
documentation notes that one function, Proximity alerts, are slowed
down when the screen is off. Are other GPS functions slowed down also?
3. I have tried a PARTIAL_WAKE_LOCK acquired in the onCreate override,
and released at the onDestroy override, but it seems to have no
affect. I also added diagnostic TTS such that when I report time I
also check whether the wake lock is held or not. Sometimes it is not
held, so who could be releasing the wake lock?
I would really appreciate any comments/advice to help me solve this
problem.
thanks...

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