Skip to content

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rdelrosario committed Feb 19, 2018
1 parent 7cbf1e9 commit 876e78e
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@
<HintPath>..\packages\Plugin.CurrentActivity.1.0.1\lib\MonoAndroid10\Plugin.CurrentActivity.dll</HintPath>
</Reference>
<Reference Include="Plugin.FirebasePushNotification, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Plugin.FirebasePushNotification.2.2.9-gamma\lib\MonoAndroid80\Plugin.FirebasePushNotification.dll</HintPath>
<HintPath>..\packages\Plugin.FirebasePushNotification.2.2.9.3-beta\lib\MonoAndroid80\Plugin.FirebasePushNotification.dll</HintPath>
</Reference>
<Reference Include="Plugin.FirebasePushNotification.Abstractions, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Plugin.FirebasePushNotification.2.2.9-gamma\lib\MonoAndroid80\Plugin.FirebasePushNotification.Abstractions.dll</HintPath>
<HintPath>..\packages\Plugin.FirebasePushNotification.2.2.9.3-beta\lib\MonoAndroid80\Plugin.FirebasePushNotification.Abstractions.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Plugin.CurrentActivity" version="1.0.1" targetFramework="monoandroid71" />
<package id="Plugin.FirebasePushNotification" version="2.2.9-gamma" targetFramework="monoandroid80" />
<package id="Plugin.FirebasePushNotification" version="2.2.9.3-beta" targetFramework="monoandroid80" />
<package id="Xamarin.Android.Support.Animated.Vector.Drawable" version="26.0.2" targetFramework="monoandroid80" />
<package id="Xamarin.Android.Support.Annotations" version="26.0.2" targetFramework="monoandroid80" />
<package id="Xamarin.Android.Support.Compat" version="26.0.2" targetFramework="monoandroid80" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,22 +122,22 @@
</ItemGroup>
<ItemGroup>
<Reference Include="Firebase.Analytics, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Xamarin.Firebase.iOS.Analytics.4.0.4\lib\Xamarin.iOS10\Firebase.Analytics.dll</HintPath>
<HintPath>..\packages\Xamarin.Firebase.iOS.Analytics.4.0.5\lib\Xamarin.iOS10\Firebase.Analytics.dll</HintPath>
</Reference>
<Reference Include="Firebase.CloudMessaging, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Xamarin.Firebase.iOS.CloudMessaging.2.0.4\lib\Xamarin.iOS10\Firebase.CloudMessaging.dll</HintPath>
<HintPath>..\packages\Xamarin.Firebase.iOS.CloudMessaging.2.0.4.1\lib\Xamarin.iOS10\Firebase.CloudMessaging.dll</HintPath>
</Reference>
<Reference Include="Firebase.Core, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Xamarin.Firebase.iOS.Core.4.0.8\lib\Xamarin.iOS10\Firebase.Core.dll</HintPath>
<HintPath>..\packages\Xamarin.Firebase.iOS.Core.4.0.13\lib\Xamarin.iOS10\Firebase.Core.dll</HintPath>
</Reference>
<Reference Include="Firebase.InstanceID, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Xamarin.Firebase.iOS.InstanceID.2.0.4\lib\Xamarin.iOS10\Firebase.InstanceID.dll</HintPath>
<HintPath>..\packages\Xamarin.Firebase.iOS.InstanceID.2.0.8\lib\Xamarin.iOS10\Firebase.InstanceID.dll</HintPath>
</Reference>
<Reference Include="Plugin.FirebasePushNotification, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Plugin.FirebasePushNotification.2.2.9-gamma\lib\Xamarin.iOS10\Plugin.FirebasePushNotification.dll</HintPath>
<HintPath>..\packages\Plugin.FirebasePushNotification.2.2.9.3-beta\lib\Xamarin.iOS10\Plugin.FirebasePushNotification.dll</HintPath>
</Reference>
<Reference Include="Plugin.FirebasePushNotification.Abstractions, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Plugin.FirebasePushNotification.2.2.9-gamma\lib\Xamarin.iOS10\Plugin.FirebasePushNotification.Abstractions.dll</HintPath>
<HintPath>..\packages\Plugin.FirebasePushNotification.2.2.9.3-beta\lib\Xamarin.iOS10\Plugin.FirebasePushNotification.Abstractions.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Xml" />
Expand Down Expand Up @@ -172,17 +172,17 @@
</PropertyGroup>
<Error Condition="!Exists('..\packages\Xamarin.Build.Download.0.4.7\build\Xamarin.Build.Download.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Build.Download.0.4.7\build\Xamarin.Build.Download.props'))" />
<Error Condition="!Exists('..\packages\Xamarin.Build.Download.0.4.7\build\Xamarin.Build.Download.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Build.Download.0.4.7\build\Xamarin.Build.Download.targets'))" />
<Error Condition="!Exists('..\packages\Xamarin.Firebase.iOS.Core.4.0.8\build\Xamarin.Firebase.iOS.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Firebase.iOS.Core.4.0.8\build\Xamarin.Firebase.iOS.Core.targets'))" />
<Error Condition="!Exists('..\packages\Xamarin.Firebase.iOS.InstanceID.2.0.4\build\Xamarin.Firebase.iOS.InstanceID.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Firebase.iOS.InstanceID.2.0.4\build\Xamarin.Firebase.iOS.InstanceID.targets'))" />
<Error Condition="!Exists('..\packages\Xamarin.Firebase.iOS.Analytics.4.0.4\build\Xamarin.Firebase.iOS.Analytics.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Firebase.iOS.Analytics.4.0.4\build\Xamarin.Firebase.iOS.Analytics.targets'))" />
<Error Condition="!Exists('..\packages\Xamarin.Firebase.iOS.CloudMessaging.2.0.4\build\Xamarin.Firebase.iOS.CloudMessaging.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Firebase.iOS.CloudMessaging.2.0.4\build\Xamarin.Firebase.iOS.CloudMessaging.targets'))" />
<Error Condition="!Exists('..\packages\Xamarin.Forms.2.5.0.122203\build\netstandard1.0\Xamarin.Forms.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Forms.2.5.0.122203\build\netstandard1.0\Xamarin.Forms.props'))" />
<Error Condition="!Exists('..\packages\Xamarin.Forms.2.5.0.122203\build\netstandard1.0\Xamarin.Forms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Forms.2.5.0.122203\build\netstandard1.0\Xamarin.Forms.targets'))" />
<Error Condition="!Exists('..\packages\Xamarin.Firebase.iOS.Core.4.0.13\build\Xamarin.Firebase.iOS.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Firebase.iOS.Core.4.0.13\build\Xamarin.Firebase.iOS.Core.targets'))" />
<Error Condition="!Exists('..\packages\Xamarin.Firebase.iOS.InstanceID.2.0.8\build\Xamarin.Firebase.iOS.InstanceID.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Firebase.iOS.InstanceID.2.0.8\build\Xamarin.Firebase.iOS.InstanceID.targets'))" />
<Error Condition="!Exists('..\packages\Xamarin.Firebase.iOS.Analytics.4.0.5\build\Xamarin.Firebase.iOS.Analytics.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Firebase.iOS.Analytics.4.0.5\build\Xamarin.Firebase.iOS.Analytics.targets'))" />
<Error Condition="!Exists('..\packages\Xamarin.Firebase.iOS.CloudMessaging.2.0.4.1\build\Xamarin.Firebase.iOS.CloudMessaging.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Firebase.iOS.CloudMessaging.2.0.4.1\build\Xamarin.Firebase.iOS.CloudMessaging.targets'))" />
</Target>
<Import Project="..\packages\Xamarin.Build.Download.0.4.7\build\Xamarin.Build.Download.targets" Condition="Exists('..\packages\Xamarin.Build.Download.0.4.7\build\Xamarin.Build.Download.targets')" />
<Import Project="..\packages\Xamarin.Firebase.iOS.Core.4.0.8\build\Xamarin.Firebase.iOS.Core.targets" Condition="Exists('..\packages\Xamarin.Firebase.iOS.Core.4.0.8\build\Xamarin.Firebase.iOS.Core.targets')" />
<Import Project="..\packages\Xamarin.Firebase.iOS.InstanceID.2.0.4\build\Xamarin.Firebase.iOS.InstanceID.targets" Condition="Exists('..\packages\Xamarin.Firebase.iOS.InstanceID.2.0.4\build\Xamarin.Firebase.iOS.InstanceID.targets')" />
<Import Project="..\packages\Xamarin.Firebase.iOS.Analytics.4.0.4\build\Xamarin.Firebase.iOS.Analytics.targets" Condition="Exists('..\packages\Xamarin.Firebase.iOS.Analytics.4.0.4\build\Xamarin.Firebase.iOS.Analytics.targets')" />
<Import Project="..\packages\Xamarin.Firebase.iOS.CloudMessaging.2.0.4\build\Xamarin.Firebase.iOS.CloudMessaging.targets" Condition="Exists('..\packages\Xamarin.Firebase.iOS.CloudMessaging.2.0.4\build\Xamarin.Firebase.iOS.CloudMessaging.targets')" />
<Import Project="..\packages\Xamarin.Forms.2.5.0.122203\build\netstandard1.0\Xamarin.Forms.targets" Condition="Exists('..\packages\Xamarin.Forms.2.5.0.122203\build\netstandard1.0\Xamarin.Forms.targets')" />
<Import Project="..\packages\Xamarin.Firebase.iOS.Core.4.0.13\build\Xamarin.Firebase.iOS.Core.targets" Condition="Exists('..\packages\Xamarin.Firebase.iOS.Core.4.0.13\build\Xamarin.Firebase.iOS.Core.targets')" />
<Import Project="..\packages\Xamarin.Firebase.iOS.InstanceID.2.0.8\build\Xamarin.Firebase.iOS.InstanceID.targets" Condition="Exists('..\packages\Xamarin.Firebase.iOS.InstanceID.2.0.8\build\Xamarin.Firebase.iOS.InstanceID.targets')" />
<Import Project="..\packages\Xamarin.Firebase.iOS.Analytics.4.0.5\build\Xamarin.Firebase.iOS.Analytics.targets" Condition="Exists('..\packages\Xamarin.Firebase.iOS.Analytics.4.0.5\build\Xamarin.Firebase.iOS.Analytics.targets')" />
<Import Project="..\packages\Xamarin.Firebase.iOS.CloudMessaging.2.0.4.1\build\Xamarin.Firebase.iOS.CloudMessaging.targets" Condition="Exists('..\packages\Xamarin.Firebase.iOS.CloudMessaging.2.0.4.1\build\Xamarin.Firebase.iOS.CloudMessaging.targets')" />
</Project>
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Plugin.FirebasePushNotification" version="2.2.9-gamma" targetFramework="xamarinios10" />
<package id="Plugin.FirebasePushNotification" version="2.2.9.3-beta" targetFramework="xamarinios10" />
<package id="Xamarin.Build.Download" version="0.4.7" targetFramework="xamarinios10" />
<package id="Xamarin.Firebase.iOS.Analytics" version="4.0.4" targetFramework="xamarinios10" />
<package id="Xamarin.Firebase.iOS.CloudMessaging" version="2.0.4" targetFramework="xamarinios10" />
<package id="Xamarin.Firebase.iOS.Core" version="4.0.8" targetFramework="xamarinios10" />
<package id="Xamarin.Firebase.iOS.InstanceID" version="2.0.4" targetFramework="xamarinios10" />
<package id="Xamarin.Firebase.iOS.Analytics" version="4.0.5" targetFramework="xamarinios10" />
<package id="Xamarin.Firebase.iOS.CloudMessaging" version="2.0.4.1" targetFramework="xamarinios10" />
<package id="Xamarin.Firebase.iOS.Core" version="4.0.13" targetFramework="xamarinios10" />
<package id="Xamarin.Firebase.iOS.InstanceID" version="2.0.8" targetFramework="xamarinios10" />
<package id="Xamarin.Forms" version="2.5.0.122203" targetFramework="xamarinios10" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@
</ItemGroup>
<ItemGroup>
<Reference Include="Plugin.FirebasePushNotification, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Plugin.FirebasePushNotification.2.2.9-gamma\lib\netstandard1.0\Plugin.FirebasePushNotification.dll</HintPath>
<HintPath>..\packages\Plugin.FirebasePushNotification.2.2.9.3-beta\lib\netstandard1.0\Plugin.FirebasePushNotification.dll</HintPath>
</Reference>
<Reference Include="Plugin.FirebasePushNotification.Abstractions, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Plugin.FirebasePushNotification.2.2.9-gamma\lib\netstandard1.0\Plugin.FirebasePushNotification.Abstractions.dll</HintPath>
<HintPath>..\packages\Plugin.FirebasePushNotification.2.2.9.3-beta\lib\netstandard1.0\Plugin.FirebasePushNotification.Abstractions.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Xamarin.Forms.2.5.0.122203\lib\portable-win+net45+wp80+win81+wpa81\Xamarin.Forms.Core.dll</HintPath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<packages>
<package id="Microsoft.NETCore.Platforms" version="1.1.0" targetFramework="portable45-net45+win8+wp8+wpa81" />
<package id="NETStandard.Library" version="1.6.1" targetFramework="portable45-net45+win8+wp8+wpa81" />
<package id="Plugin.FirebasePushNotification" version="2.2.9-gamma" targetFramework="portable45-net45+win8+wp8+wpa81" />
<package id="Plugin.FirebasePushNotification" version="2.2.9.3-beta" targetFramework="portable45-net45+win8+wp8+wpa81" />
<package id="System.Collections" version="4.3.0" targetFramework="portable45-net45+win8+wp8+wpa81" />
<package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="portable45-net45+win8+wp8+wpa81" />
<package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="portable45-net45+win8+wp8+wpa81" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ public void OnReceived(IDictionary<string, object> parameters)
.SetContentIntent(pendingIntent);

var deleteIntent = new Intent(context,typeof(PushNotificationDeletedReceiver));
var pendingDeleteIntent = PendingIntent.GetBroadcast(context, requestCode, deleteIntent, PendingIntentFlags.UpdateCurrent);
var pendingDeleteIntent = PendingIntent.GetBroadcast(context, requestCode, deleteIntent, PendingIntentFlags.CancelCurrent);
notificationBuilder.SetDeleteIntent(pendingDeleteIntent);

if (Build.VERSION.SdkInt < Android.OS.BuildVersionCodes.O)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public static void Initialize(Context context, bool resetToken, bool createDefau

if (resetToken || (!string.IsNullOrEmpty(storedPackageName) && (!storedPackageName.Equals(packageName, StringComparison.CurrentCultureIgnoreCase) || !storedVersionName.Equals(versionName, StringComparison.CurrentCultureIgnoreCase) || !storedVersionCode.Equals($"{versionCode}", StringComparison.CurrentCultureIgnoreCase))))
{
CleanUp();
CleanUp(false);

}

Expand Down Expand Up @@ -233,9 +233,13 @@ public void UnregisterForPushNotifications()
{
Reset();
}
static void CleanUp()
static void CleanUp(bool clearAll = true)
{
CrossFirebasePushNotification.Current.UnsubscribeAll();
if(clearAll)
{
CrossFirebasePushNotification.Current.UnsubscribeAll();
}

FirebaseInstanceId.Instance.DeleteInstanceId();
SaveToken(string.Empty);
}
Expand Down
Loading

0 comments on commit 876e78e

Please sign in to comment.