Skip to content

Commit d94af6a

Browse files
Merge pull request #5 from xamplum/feature_target-android12
Target Android 12
2 parents d34f021 + 40ea768 commit d94af6a

11 files changed

+1735
-2800
lines changed

sample/Sample.Android/NotificationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
using Android.App;
99
using Android.Content;
1010
using Android.OS;
11-
using Android.Support.V4.App;
11+
using AndroidX.Core.App;
1212
using Notifo.SDK;
1313

1414
namespace Sample.Droid

sample/Sample.Android/Resources/Resource.designer.cs

Lines changed: 1668 additions & 2730 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sample/Sample.Android/Sample.Android.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
1818
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
1919
<AndroidUseLatestPlatformSdk>false</AndroidUseLatestPlatformSdk>
20-
<TargetFrameworkVersion>v10.0</TargetFrameworkVersion>
20+
<TargetFrameworkVersion>v12.0</TargetFrameworkVersion>
2121
<AndroidEnableSGenConcurrent>true</AndroidEnableSGenConcurrent>
2222
<AndroidUseAapt2>true</AndroidUseAapt2>
2323
<AndroidHttpClientHandlerType>Xamarin.Android.Net.AndroidClientHandler</AndroidHttpClientHandlerType>

sdk/Notifo.SDK.FirebasePlugin/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
<PackageLicenseExpression>MIT</PackageLicenseExpression>
1010
<PackageProjectUrl>https://notifo.io</PackageProjectUrl>
1111
<PackageTags>notifo xamarin firebase</PackageTags>
12-
<Version>0.0.1-alpha</Version>
12+
<Version>0.0.8-beta</Version>
1313
</PropertyGroup>
1414
</Project>
Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,59 @@
11
<Project Sdk="MSBuild.Sdk.Extras/3.0.22">
22

3-
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.1;xamarinios10;monoandroid10.0;</TargetFrameworks>
5-
<LangVersion>8.0</LangVersion>
6-
<Nullable>enable</Nullable>
7-
<RootNamespace>Notifo.SDK.FirebasePlugin</RootNamespace>
8-
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
9-
<GenerateDocumentationFile>true</GenerateDocumentationFile>
10-
</PropertyGroup>
11-
12-
<ItemGroup>
13-
<None Include="logo-squared.png" Pack="true" PackagePath="\" />
14-
</ItemGroup>
15-
16-
<PropertyGroup>
17-
<CodeAnalysisRuleSet>..\..\Notifo.ruleset</CodeAnalysisRuleSet>
18-
<AssemblyName>Notifo.Xamarin.FirebasePlugin</AssemblyName>
19-
</PropertyGroup>
20-
21-
<ItemGroup>
22-
<AdditionalFiles Include="..\..\stylecop.json" Link="stylecop.json" />
23-
</ItemGroup>
24-
25-
<ItemGroup>
26-
<Compile Remove="**\*.netstandard.cs" />
27-
<Compile Remove="**\*.android.cs" />
28-
<Compile Remove="**\*.ios.cs" />
29-
</ItemGroup>
30-
31-
<ItemGroup Condition=" $(TargetFramework.StartsWith('netstandard')) ">
32-
<Compile Include="**\*.netstandard.cs" />
33-
</ItemGroup>
34-
35-
<ItemGroup Condition=" $(TargetFramework.StartsWith('xamarinios')) ">
36-
<Compile Include="**\*.ios.cs" />
37-
</ItemGroup>
38-
39-
<ItemGroup Condition=" $(TargetFramework.StartsWith('monoandroid')) ">
40-
<Compile Include="**\*.android.cs" />
41-
</ItemGroup>
42-
43-
<ItemGroup>
44-
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="5.0.0" />
45-
<PackageReference Include="Plugin.FirebasePushNotification" Version="3.3.10" />
46-
<PackageReference Include="RefactoringEssentials" Version="5.6.0">
47-
<PrivateAssets>all</PrivateAssets>
48-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
49-
</PackageReference>
50-
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
51-
<PrivateAssets>all</PrivateAssets>
52-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
53-
</PackageReference>
54-
</ItemGroup>
55-
56-
<ItemGroup>
57-
<ProjectReference Include="..\Notifo.SDK\Notifo.SDK.Core.csproj" />
58-
</ItemGroup>
3+
<PropertyGroup>
4+
<TargetFrameworks>netstandard2.1;xamarinios10;monoandroid12.0;</TargetFrameworks>
5+
<LangVersion>8.0</LangVersion>
6+
<Nullable>enable</Nullable>
7+
<RootNamespace>Notifo.SDK.FirebasePlugin</RootNamespace>
8+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
9+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
10+
</PropertyGroup>
11+
12+
<ItemGroup>
13+
<None Include="logo-squared.png" Pack="true" PackagePath="\" />
14+
</ItemGroup>
15+
16+
<PropertyGroup>
17+
<CodeAnalysisRuleSet>..\..\Notifo.ruleset</CodeAnalysisRuleSet>
18+
<AssemblyName>Notifo.Xamarin.FirebasePlugin</AssemblyName>
19+
</PropertyGroup>
20+
21+
<ItemGroup>
22+
<AdditionalFiles Include="..\..\stylecop.json" Link="stylecop.json" />
23+
</ItemGroup>
24+
25+
<ItemGroup>
26+
<Compile Remove="**\*.netstandard.cs" />
27+
<Compile Remove="**\*.android.cs" />
28+
<Compile Remove="**\*.ios.cs" />
29+
</ItemGroup>
30+
31+
<ItemGroup Condition=" $(TargetFramework.StartsWith('netstandard')) ">
32+
<Compile Include="**\*.netstandard.cs" />
33+
</ItemGroup>
34+
35+
<ItemGroup Condition=" $(TargetFramework.StartsWith('xamarinios')) ">
36+
<Compile Include="**\*.ios.cs" />
37+
</ItemGroup>
38+
39+
<ItemGroup Condition=" $(TargetFramework.StartsWith('monoandroid')) ">
40+
<Compile Include="**\*.android.cs" />
41+
</ItemGroup>
42+
43+
<ItemGroup>
44+
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="5.0.0" />
45+
<PackageReference Include="Plugin.FirebasePushNotification" Version="3.4.22" />
46+
<PackageReference Include="RefactoringEssentials" Version="5.6.0">
47+
<PrivateAssets>all</PrivateAssets>
48+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
49+
</PackageReference>
50+
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
51+
<PrivateAssets>all</PrivateAssets>
52+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
53+
</PackageReference>
54+
</ItemGroup>
55+
56+
<ItemGroup>
57+
<ProjectReference Include="..\Notifo.SDK\Notifo.SDK.Core.csproj" />
58+
</ItemGroup>
5959
</Project>

sdk/Notifo.SDK.FirebasePlugin/NotifoPushNotificationHandler.android.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
using System;
99
using System.Collections.Generic;
10-
using Android.Support.V4.App;
10+
using AndroidX.Core.App;
1111
using Notifo.SDK.Extensions;
1212
using Notifo.SDK.NotifoMobilePush;
1313
using Notifo.SDK.Resources;

sdk/Notifo.SDK/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
<PackageLicenseExpression>MIT</PackageLicenseExpression>
1010
<PackageProjectUrl>https://notifo.io</PackageProjectUrl>
1111
<PackageTags>notifo xamarin</PackageTags>
12-
<Version>0.0.1-alpha1</Version>
12+
<Version>0.0.8-beta</Version>
1313
</PropertyGroup>
1414
</Project>

sdk/Notifo.SDK/INotificationHandler.android.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// All rights reserved. Licensed under the MIT license.
66
// ==========================================================================
77

8-
using Android.Support.V4.App;
8+
using AndroidX.Core.App;
99

1010
namespace Notifo.SDK
1111
{

sdk/Notifo.SDK/Notifo.SDK.Core.csproj

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="MSBuild.Sdk.Extras/3.0.22">
22
<PropertyGroup>
3-
<TargetFrameworks>netstandard2.1;xamarinios10;monoandroid10.0;</TargetFrameworks>
3+
<TargetFrameworks>netstandard2.1;xamarinios10;monoandroid12.0;</TargetFrameworks>
44
<RootNamespace>Notifo.SDK</RootNamespace>
55
<LangVersion>8.0</LangVersion>
66
<Nullable>enable</Nullable>
@@ -64,13 +64,10 @@
6464
</PackageReference>
6565
</ItemGroup>
6666

67-
<ItemGroup Condition="'$(TargetFramework)' == 'monoandroid10.0'">
67+
<ItemGroup Condition="'$(TargetFramework)' == 'monoandroid12.0'">
6868
<PackageReference Include="Serilog.Sinks.Xamarin">
6969
<Version>0.2.0.64</Version>
7070
</PackageReference>
71-
<PackageReference Include="Xamarin.Android.Support.v4">
72-
<Version>28.0.0.3</Version>
73-
</PackageReference>
7471
</ItemGroup>
7572

7673
<ItemGroup>

sdk/Notifo.SDK/NotifoMobilePush/NotifoMobilePushImplementation.android.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
using Android.App;
1010
using Android.Content;
1111
using Android.Graphics;
12-
using Android.Support.V4.App;
12+
using AndroidX.Core.App;
1313
using Java.Net;
1414
using Microsoft.Extensions.Caching.Memory;
1515
using Notifo.SDK.Resources;
@@ -161,7 +161,7 @@ private void AddAction(NotificationCompat.Builder notificationBuilder, string ti
161161
{
162162
var notificationIntent = new Intent(Intent.ActionView);
163163
notificationIntent.SetData(Android.Net.Uri.Parse(url));
164-
var buttonIntent = PendingIntent.GetActivity(Application.Context, 0, notificationIntent, 0);
164+
var buttonIntent = PendingIntent.GetActivity(Application.Context, 0, notificationIntent, PendingIntentFlags.UpdateCurrent | PendingIntentFlags.Immutable);
165165

166166
notificationBuilder.AddAction(0, title, buttonIntent);
167167
}

0 commit comments

Comments
 (0)