| | |
| | | using Android.App; |
| | | |
| | | using Android.Content; |
| | | using Android.OS; |
| | | using Android.Runtime; |
| | | using Android.Views; |
| | | using Android.Widget; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | |
| | | namespace JPushSample |
| | | using System; |
| | | |
| | | using CN.Jpush.Android.Api; |
| | | |
| | | namespace HDL_ON_Android |
| | | { |
| | | |
| | | [BroadcastReceiver(Enabled = true, Exported = false, Name = "com.hdl.onpro.JPushFirmBroadcast")] |
| | |
| | | cn.jpush.android.TITLE, |
| | | cn.jpush.android.MESSAGE*/ |
| | | |
| | | try |
| | | { |
| | | NotificationMessage notificationMessage = new NotificationMessage(); |
| | | String extra = intent.GetStringExtra(JPushInterface.ExtraExtra); |
| | | String msgId = intent.GetStringExtra(JPushInterface.ExtraMsgId); |
| | | |
| | | String message = intent.GetStringExtra(JPushInterface.ExtraMessage); |
| | | String title = intent.GetStringExtra(JPushInterface.ExtraTitle); |
| | | // String typePlatform = intent.GetStringExtra(JPushInterface.ExtraTypePlatform); |
| | | |
| | | notificationMessage.NotificationTitle = title; |
| | | notificationMessage.NotificationContent = message; |
| | | notificationMessage.NotificationExtras = extra; |
| | | |
| | | JPushReceiver.OpenNotification(context, notificationMessage); |
| | | |
| | | } |
| | | catch |
| | | { |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |