2
A
回答
5
你想用Android.App.Notification和Android.App.NotificationManager,例如LocalService.ShowNotification():
// within some Android.Content.Context subclass (Activity, Service, etc.)
void ShowNotification()
{
IEnumerable<char> text = GetText (Resource.String.local_service_started);
var notification = new Notification (Resource.Drawable.stat_sample,
text,
System.Environment.TickCount);
PendingIntent contentIntent = PendingIntent.GetActivity (this, 0,
new Intent (this, typeof (LocalServiceActivities.Controller)),
0);
notification.SetLatestEventInfo (this,
GetText ([email protected]_service_label),
text,
contentIntent);
var nm = (NotificationManager) GetSystemService (NotificationService);
nm.Notify (Resource.String.local_service_started, notification);
}
0
你可以看到下面的鏈接,並像網頁看到更多: https://www.facebook.com/pages/M%C3%A3-Ngu%E1%BB%93n/371039113001844
0
嘗試PushSharp: https://github.com/Redth/PushSharp
它對我很好。
相關問題
- 1. Monodroid隱藏和顯示狀態欄
- 2. 狀態欄上顯示單行通知?
- 3. 狀態欄通知
- 4. 狀態欄通知
- 5. 如何使用android phonegap在狀態欄顯示通知數
- 6. 使用Eddystone信標在Android狀態欄中顯示通知
- 7. 多個狀態欄通知
- 8. 通知狀態欄文本
- 9. Phonegap - Android - 狀態欄通知
- 10. Android狀態欄通知 - 通過任何方式通知狀態欄(烤麪包)通過狀態欄?
- 11. PhoneGap的狀態欄通知
- 12. 處理狀態欄通知
- 13. 如何使用iPhone中的動態數據在狀態欄中顯示通知?
- 14. Android狀態欄通知
- 15. 狀態欄旋轉通知
- 16. iOS SDK。顯示通話狀態欄
- 17. 推送通知不會顯示在狀態欄
- 18. 點擊狀態欄通知並顯示詳細信息?
- 19. 如何在狀態欄中顯示默認無聲通知?
- 20. 在android中顯示狀態欄服務通知
- 21. 通知圖標顯示在狀態欄,但是卻缺少通知本身
- 22. 安卓:當新通知到達時顯示/隱藏狀態欄
- 23. 在iPhone的狀態欄上顯示文本通知
- 24. 通知圖標不顯示在棒棒糖的狀態欄中
- 25. 通知不會顯示在狀態欄小圖標
- 26. 僅當狀態欄展開時才顯示Android通知
- 27. 顯示來自BroadcastReceiver的狀態欄通知
- 28. 想要在發佈通知後在狀態欄中顯示通知
- 29. 如何顯示在狀態欄上一個通知圖標多個通知
- 30. Android:靜態狀態欄通知
請在此處添加代碼以獲取示例。 – Amit 2013-06-05 02:48:55