[android-developers] Power button

2011-12-20 Thread Jeffrey Dunbar
I am developing an app, I would like to use the power button as a
panic button. Is there a way to hook into and catch globally from a
service. I know that android fires the intent.action SCREEN_ON and
_OFF but this causes issues. I have a service that monitors for screen
on/off sets an alarm on first press to expire and reset a setting if
not hit 3 times in 1.5 seconds. There are times that this condition
can be met just by the normal power down of the screen. e.g. market is
downloading an app and screen goes to sleep, you wake up to check and
turn off the screen after checking

Any help greatly appreciated.

Jeff

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Regarding play audio files using SoundPool class

2011-12-20 Thread Jeffrey Dunbar
What requirements are you needing. I would suggest amrnb or ogg to
keep them small,
ogg for quality, never wav or mp3. I personally would put them in the
asset directory
it seemed to work better for my app

Jeff

On Dec 19, 11:15 pm, kumar varma kkvarm...@gmail.com wrote:
 I've created an application which uses around 40 small audio files.
 Right now I'm using mp3 files and each is around 250KB. These files
 are stored in my res/raw directory.
 I'm using SoundPool class to play the files in my application.

 Can one of you suggest what is the best way to store so many audio
 files? Will my application be scalable?
 Is wav or ogg format better approach instead of mp3? Please let me
 know. and one more doubt every time I wanna play  3 audio files one by
 one using SoundPool class can you
  please any one suggest me  to do this

 Thanks ,
 Kumar.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en