From 95a7e380db583108d9716c56fe6d298ca08f8f23 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期二, 07 九月 2021 10:13:53 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/jpush_tst' into wxr7 --- HDL-ON_Android/Other/JPush/JPushOpenClickActivity.cs | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 55 insertions(+), 0 deletions(-) diff --git a/HDL-ON_Android/Other/JPush/JPushOpenClickActivity.cs b/HDL-ON_Android/Other/JPush/JPushOpenClickActivity.cs new file mode 100644 index 0000000..66ac1ca --- /dev/null +++ b/HDL-ON_Android/Other/JPush/JPushOpenClickActivity.cs @@ -0,0 +1,55 @@ +锘縰sing Android.App; +using Android.Content; +using Android.OS; + +using Com.Hdl.ON.Jpush.Androidjpush; + +using Android.Views; + +namespace HDL_ON_Android +{ + [Activity( + Exported = true, Enabled = true, Name = "com.hdl.onpro.JPushOpenClickActivity" + , Theme = "@android:style/Theme.Translucent.NoTitleBar")] + [IntentFilter(new string[] { "com.hdl.onpro.JPushOpenClickActivity", Intent.ActionView }, + Categories = new string[] + { + "com.hdl.onpro",Intent.CategoryDefault + }) + ] + public class JPushOpenClickActivity : Activity + { + + + protected override void OnCreate(Bundle savedInstanceState) + { + base.OnCreate(savedInstanceState); + View v = new View(this); + SetContentView(v); + HandleOpenClick(Intent); + + } + + protected void HandleOpenClick(Intent intent) + { + Intent broadcastIntent = new Intent(); + broadcastIntent.SetAction("com.hdl.onpro.jpush.firm.NOTIFICATION_OPENED"); + ComponentName componentName = new ComponentName(PackageName, "com.hdl.onpro.JPushFirmBroadcast"); + + if (Build.VERSION.SdkInt >= BuildVersionCodes.O) + { + broadcastIntent.SetComponent(componentName); + } + FirmOpenClickHelper.Instance.HandleOpenClick(this, intent, broadcastIntent); + Finish(); + + } + + protected override void OnNewIntent(Intent intent) + { + base.OnNewIntent(intent); + HandleOpenClick(intent); + + } + } +} \ No newline at end of file -- Gitblit v1.8.0