From 0b3b44ed26ce26ac5852374f7c7e459e7dbdf1c3 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期四, 04 十一月 2021 14:45:58 +0800
Subject: [PATCH] 编辑场景成功之后,取消之前的执行动作
---
HDL-ON_Android/Other/JPush/JPushOpenClickActivity.cs | 37 +++++++++++++++++--------------------
1 files changed, 17 insertions(+), 20 deletions(-)
diff --git a/HDL-ON_Android/Other/JPush/JPushOpenClickActivity.cs b/HDL-ON_Android/Other/JPush/JPushOpenClickActivity.cs
index 31b9aca..66ac1ca 100644
--- a/HDL-ON_Android/Other/JPush/JPushOpenClickActivity.cs
+++ b/HDL-ON_Android/Other/JPush/JPushOpenClickActivity.cs
@@ -1,19 +1,16 @@
锘縰sing 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;
+
using Com.Hdl.ON.Jpush.Androidjpush;
-namespace JPushSample
+using Android.Views;
+
+namespace HDL_ON_Android
{
- [Activity(LaunchMode = Android.Content.PM.LaunchMode.SingleTop,
- Exported = true, Enabled = true, Name = "com.hdl.onpro.JPushOpenClickActivity")]
+ [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[]
{
@@ -27,31 +24,31 @@
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
+ View v = new View(this);
+ SetContentView(v);
+ HandleOpenClick(Intent);
}
- protected void HandleOpenClick()
+ protected void HandleOpenClick(Intent intent)
{
- Intent intent = new Intent();
- intent.SetAction("com.hdl.onpro.jpush.firm.NOTIFICATION_OPENED");
+ 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)
{
- intent.SetComponent(componentName);
+ broadcastIntent.SetComponent(componentName);
}
-
-
- this.SendBroadcast(intent);
- FirmOpenClickHelper.Instance.HandleOpenClick(this, Intent, intent);
+ FirmOpenClickHelper.Instance.HandleOpenClick(this, intent, broadcastIntent);
Finish();
+
}
protected override void OnNewIntent(Intent intent)
{
base.OnNewIntent(intent);
- Intent = intent;
- HandleOpenClick();
+ HandleOpenClick(intent);
}
}
--
Gitblit v1.8.0