HDL Home App 第二版本 旧平台金堂用 正在使用
hxb
2022-08-30 25429f085093d89d543a0b90e30d0d62d1b7dac9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using 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.evoyo.home.JPushOpenClickActivity"
        , Theme = "@android:style/Theme.Translucent.NoTitleBar")]
    [IntentFilter(new string[] { "com.evoyo.home.JPushOpenClickActivity", Intent.ActionView },
         Categories = new string[] {  "com.evoyo.home",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.evoyo.home.jpush.firm.NOTIFICATION_OPENED");
            ComponentName componentName = new ComponentName(PackageName, "com.evoyo.home.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);
 
        }
    }
}