Skip to content

Commit

Permalink
ios,android,uwp通过Azure通知中心推送集成完成
Browse files Browse the repository at this point in the history
  • Loading branch information
cjw1115 committed May 4, 2017
1 parent 4317d40 commit da91ac5
Show file tree
Hide file tree
Showing 46 changed files with 6,996 additions and 156 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -258,4 +258,6 @@ paket-files/

# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
*.pyc
/azure-messaging-1.2.5.2/component/icons
/azure-messaging-1.2.5.2/component
152 changes: 152 additions & 0 deletions NotificationDemo.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NotificationDemo.UWP", "Not
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NotificationDemo.iOS", "NotificationDemo\NotificationDemo.iOS\NotificationDemo.iOS.csproj", "{2203132C-19DD-42A6-8512-15F7F271C28C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BaiduNotification", "..\AndroidBinding\BaiduNotification\BaiduNotification.csproj", "{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JPushNotification", "..\AndroidBinding\JPushNotification\JPushNotification.csproj", "{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NotificationDemoServer", "NotificationDemoServer\NotificationDemoServer.csproj", "{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Ad-Hoc|Any CPU = Ad-Hoc|Any CPU
Expand Down Expand Up @@ -196,6 +202,8 @@ Global
{F1A5357D-DC9A-489A-B596-6BBADA4A059E}.AppStore|x86.Build.0 = Release|x86
{F1A5357D-DC9A-489A-B596-6BBADA4A059E}.AppStore|x86.Deploy.0 = Release|x86
{F1A5357D-DC9A-489A-B596-6BBADA4A059E}.Debug|Any CPU.ActiveCfg = Debug|x86
{F1A5357D-DC9A-489A-B596-6BBADA4A059E}.Debug|Any CPU.Build.0 = Debug|x86
{F1A5357D-DC9A-489A-B596-6BBADA4A059E}.Debug|Any CPU.Deploy.0 = Debug|x86
{F1A5357D-DC9A-489A-B596-6BBADA4A059E}.Debug|ARM.ActiveCfg = Debug|ARM
{F1A5357D-DC9A-489A-B596-6BBADA4A059E}.Debug|ARM.Build.0 = Debug|ARM
{F1A5357D-DC9A-489A-B596-6BBADA4A059E}.Debug|ARM.Deploy.0 = Debug|ARM
Expand Down Expand Up @@ -251,6 +259,150 @@ Global
{2203132C-19DD-42A6-8512-15F7F271C28C}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{2203132C-19DD-42A6-8512-15F7F271C28C}.Release|x64.ActiveCfg = Release|iPhone
{2203132C-19DD-42A6-8512-15F7F271C28C}.Release|x86.ActiveCfg = Release|iPhone
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Ad-Hoc|ARM.Build.0 = Release|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Ad-Hoc|x64.Build.0 = Release|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Ad-Hoc|x86.Build.0 = Release|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.AppStore|Any CPU.ActiveCfg = Release|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.AppStore|Any CPU.Build.0 = Release|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.AppStore|ARM.ActiveCfg = Release|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.AppStore|ARM.Build.0 = Release|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.AppStore|iPhone.ActiveCfg = Release|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.AppStore|iPhone.Build.0 = Release|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.AppStore|x64.ActiveCfg = Release|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.AppStore|x64.Build.0 = Release|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.AppStore|x86.ActiveCfg = Release|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.AppStore|x86.Build.0 = Release|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Debug|ARM.ActiveCfg = Debug|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Debug|ARM.Build.0 = Debug|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Debug|iPhone.Build.0 = Debug|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Debug|x64.ActiveCfg = Debug|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Debug|x64.Build.0 = Debug|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Debug|x86.ActiveCfg = Debug|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Debug|x86.Build.0 = Debug|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Release|Any CPU.Build.0 = Release|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Release|ARM.ActiveCfg = Release|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Release|ARM.Build.0 = Release|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Release|iPhone.ActiveCfg = Release|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Release|iPhone.Build.0 = Release|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Release|x64.ActiveCfg = Release|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Release|x64.Build.0 = Release|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Release|x86.ActiveCfg = Release|Any CPU
{F0827266-B7B7-4B98-BDE4-BDFB30A149AA}.Release|x86.Build.0 = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Ad-Hoc|ARM.Build.0 = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Ad-Hoc|x64.Build.0 = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Ad-Hoc|x86.Build.0 = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.AppStore|Any CPU.ActiveCfg = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.AppStore|Any CPU.Build.0 = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.AppStore|ARM.ActiveCfg = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.AppStore|ARM.Build.0 = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.AppStore|iPhone.ActiveCfg = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.AppStore|iPhone.Build.0 = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.AppStore|x64.ActiveCfg = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.AppStore|x64.Build.0 = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.AppStore|x86.ActiveCfg = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.AppStore|x86.Build.0 = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Debug|ARM.ActiveCfg = Debug|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Debug|ARM.Build.0 = Debug|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Debug|iPhone.Build.0 = Debug|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Debug|x64.ActiveCfg = Debug|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Debug|x64.Build.0 = Debug|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Debug|x86.ActiveCfg = Debug|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Debug|x86.Build.0 = Debug|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Release|Any CPU.Build.0 = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Release|ARM.ActiveCfg = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Release|ARM.Build.0 = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Release|iPhone.ActiveCfg = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Release|iPhone.Build.0 = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Release|x64.ActiveCfg = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Release|x64.Build.0 = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Release|x86.ActiveCfg = Release|Any CPU
{AE9E5B5E-A3E9-4820-BB8A-8A5193C7DA0E}.Release|x86.Build.0 = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Ad-Hoc|ARM.Build.0 = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Ad-Hoc|x64.Build.0 = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Ad-Hoc|x86.Build.0 = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.AppStore|Any CPU.ActiveCfg = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.AppStore|Any CPU.Build.0 = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.AppStore|ARM.ActiveCfg = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.AppStore|ARM.Build.0 = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.AppStore|iPhone.ActiveCfg = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.AppStore|iPhone.Build.0 = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.AppStore|x64.ActiveCfg = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.AppStore|x64.Build.0 = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.AppStore|x86.ActiveCfg = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.AppStore|x86.Build.0 = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Debug|ARM.ActiveCfg = Debug|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Debug|ARM.Build.0 = Debug|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Debug|iPhone.Build.0 = Debug|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Debug|x64.ActiveCfg = Debug|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Debug|x64.Build.0 = Debug|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Debug|x86.ActiveCfg = Debug|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Debug|x86.Build.0 = Debug|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Release|Any CPU.Build.0 = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Release|ARM.ActiveCfg = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Release|ARM.Build.0 = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Release|iPhone.ActiveCfg = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Release|iPhone.Build.0 = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Release|x64.ActiveCfg = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Release|x64.Build.0 = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Release|x86.ActiveCfg = Release|Any CPU
{65A190AD-0D82-4F0F-9844-674EA4B5E4F1}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
31 changes: 31 additions & 0 deletions NotificationDemo/NotificationDemo.Android/JPushReceiver.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using CN.Jpush.Android.Service;

namespace NotificationDemo.Droid
{
//[BroadcastReceiver]
//[IntentFilter(new string[] { "cn.jpush.android.intent.REGISTRATION" }, Categories = new string[] { "com.cq.notificationdemo" })]
//[IntentFilter(new string[] { "cn.jpush.android.intent.UNREGISTRATION" }, Categories = new string[] { "com.cq.notificationdemo" })]
//[IntentFilter(new string[] { "cn.jpush.android.intent.MESSAGE_RECEIVED" }, Categories = new string[] { "com.cq.notificationdemo" })]
//[IntentFilter(new string[] { "cn.jpush.android.intent.NOTIFICATION_RECEIVED" }, Categories = new string[] { "com.cq.notificationdemo" })]
//[IntentFilter(new string[] { "cn.jpush.android.intent.NOTIFICATION_OPENED" }, Categories = new string[] { "com.cq.notificationdemo" })]
//[IntentFilter(new string[] { "cn.jpush.android.intent.ACTION_RICHPUSH_CALLBACK" }, Categories = new string[] { "com.cq.notificationdemo" })]
public class JPushReceiver : PushReceiver
{
public override void OnReceive(Context ctx, Intent ite)
{
//在这里处理各种消息类型
base.OnReceive(ctx, ite);
}
}
}
14 changes: 14 additions & 0 deletions NotificationDemo/NotificationDemo.Android/MainActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
using Android.Widget;
using Android.OS;

using Xamarin.Forms.Xaml;
using Com.Baidu.Android.Pushservice;
using Android.Content;
using CN.Jpush.Android.Api;

namespace NotificationDemo.Droid
{
[Activity(Label = "NotificationDemo", Icon = "@drawable/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
Expand All @@ -21,6 +26,15 @@ protected override void OnCreate(Bundle bundle)

global::Xamarin.Forms.Forms.Init(this, bundle);
LoadApplication(new App());

//RegisterReceiver(new NotificationDemo.Droid.NotifyMessageReceiver(), new IntentFilter(""));
PushManager.StartWork(ApplicationContext, PushConstants.LoginTypeApiKey, ConfigurationSettings.API_KEY);
PushSettings.EnableDebugMode(ApplicationContext, true);
//JPushInterface.SetDebugMode(true);
//JPushInterface.Init(this);

//var name = typeof(MainActivity).Assembly.ToString();

}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugSymbols>True</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
Expand All @@ -35,7 +35,15 @@
<WarningLevel>4</WarningLevel>
<AndroidUseSharedRuntime>True</AndroidUseSharedRuntime>
<AndroidLinkMode>None</AndroidLinkMode>
<AndroidSupportedAbis>armeabi,armeabi-v7a,x86</AndroidSupportedAbis>
<AndroidSupportedAbis>armeabi;x86</AndroidSupportedAbis>
<EmbedAssembliesIntoApk>False</EmbedAssembliesIntoApk>
<BundleAssemblies>False</BundleAssemblies>
<AndroidCreatePackagePerAbi>False</AndroidCreatePackagePerAbi>
<Debugger>.Net (Xamarin)</Debugger>
<AotAssemblies>False</AotAssemblies>
<EnableLLVM>False</EnableLLVM>
<AndroidEnableMultiDex>False</AndroidEnableMultiDex>
<EnableProguard>False</EnableProguard>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand Down Expand Up @@ -82,6 +90,9 @@
<Reference Include="Xamarin.Android.Support.Vector.Drawable, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Vector.Drawable.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Azure.NotificationHubs.Android">
<HintPath>..\..\azure-messaging-1.2.5.2\lib\android\Xamarin.Azure.NotificationHubs.Android.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Forms.2.3.4.224\lib\MonoAndroid10\Xamarin.Forms.Core.dll</HintPath>
</Reference>
Expand All @@ -96,12 +107,16 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="JPushReceiver.cs" />
<Compile Include="MainActivity.cs" />
<Compile Include="NotifyMessageReceive.cs" />
<Compile Include="Resources\Resource.Designer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="packages.config">
<SubType>Designer</SubType>
</None>
<None Include="Resources\AboutResources.txt" />
<None Include="Assets\AboutAssets.txt" />
</ItemGroup>
Expand All @@ -112,14 +127,24 @@
<AndroidResource Include="Resources\drawable-xxhdpi\icon.png" />
</ItemGroup>
<ItemGroup>
<None Include="Properties\AndroidManifest.xml" />
<Content Include="Properties\AndroidManifest.xml">
<SubType>Designer</SubType>
</Content>
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\layout\Tabbar.axml" />
<AndroidResource Include="Resources\layout\Toolbar.axml" />
<AndroidResource Include="Resources\values\styles.xml" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\AndroidBinding\BaiduNotification\BaiduNotification.csproj">
<Project>{f0827266-b7b7-4b98-bde4-bdfb30a149aa}</Project>
<Name>BaiduNotification</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\AndroidBinding\JPushNotification\JPushNotification.csproj">
<Project>{ae9e5b5e-a3e9-4820-bb8a-8a5193c7da0e}</Project>
<Name>JPushNotification</Name>
</ProjectReference>
<ProjectReference Include="..\NotificationDemo\NotificationDemo.csproj">
<Project>{979dd6b8-fc46-4187-8123-40545200b842}</Project>
<Name>NotificationDemo</Name>
Expand Down
Loading

0 comments on commit da91ac5

Please sign in to comment.