2012-01-10 30 views
-1

我想在終端處於「睡眠模式/待機狀態」時顯示通知/鬧鐘。就像WhatsApp,Handcensms ...或簡單的鬧鐘一樣。顯示通知鬧鐘管理器/喚醒鎖定/睡眠(Android中的本地通知)

例如,在IOS被稱爲「本地通知」,看起來像: http://www.remotenotification.com/wp-content/uploads/2011/08/PushNotification1.jpg

我念叨AlarmManager,窗口管理器。但我不明白。

任何人都可以幫助我或引導我嗎?

我不知道什麼使用權限是必要的。

問候&感謝

+0

在android中這被稱爲吐司。 – JoxTraex 2012-01-10 11:39:51

回答

0

也許這是一個相當愚蠢的反應,但你的意思是烤麪包的消息? http://developer.android.com/guide/topics/ui/notifiers/toasts.html

Toast.makeText(context, "This text will be displayed", 100).show(); 
+0

不。終端處於睡眠模式時不顯示。 – ephramd 2012-01-10 15:11:35

+1

也許這將是任何幫助http://android.arnodenhond.com/tutorials/alarm-notification – Bram 2012-01-10 21:10:31