Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Beep or Light without a Notification object?

Is there any way to start a beep (yes, a beep sound) or turn on the light of a device without a Notification instance?

With a notification it's easy as shown here: http://developer.android.com/guide/topics/ui/notifiers/notifications.html

This is possible to do with iPhone API, and I need the exaclty same behavior on android.

like image 443
Panthro Avatar asked Mar 11 '11 22:03

Panthro


2 Answers

I don't think thats possible. You will have to stick with the notify and cancel workaround. Just as an example see the TweetDeck android app. In the column settings, there are options on top that say : Notify, Light, Sound, Vibrate. You can select either of Light, Sound and Vibrate or a combination of these, however, they all need the notify to be selected.

like image 163
advantej Avatar answered Nov 15 '22 00:11

advantej


You can use the media player and play an audio file. http://developer.android.com/reference/android/media/MediaPlayer.html

like image 33
Jim Avatar answered Nov 14 '22 23:11

Jim