Skip to content

Commit

Permalink
add abstract base class in java world to access OSRemoteNotificationR…
Browse files Browse the repository at this point in the history
…eceivedHandler
  • Loading branch information
tmijieux committed Dec 2, 2023
1 parent 6b4cffd commit c38ccc1
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 4 deletions.
Binary file modified OneSignal.Android.Binding/Jars/onesignal-release.aar
Binary file not shown.
7 changes: 5 additions & 2 deletions OneSignal.Android.Binding/OneSignal.Android.Binding.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
<AssemblyName>OneSignal.Android.Binding</AssemblyName>
<TargetFrameworkVersion>v11.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v12.0</TargetFrameworkVersion>
<AndroidSdkBuildToolsVersion Condition="'$(AndroidSdkBuildToolsVersion)' == ''">28.0.3</AndroidSdkBuildToolsVersion>
<AndroidTlsProvider></AndroidTlsProvider>
<AndroidClassParser>class-parse</AndroidClassParser>
Expand Down Expand Up @@ -55,5 +55,8 @@
<ItemGroup>
<LibraryProjectZip Include="Jars\onesignal-release.aar" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.AndroidX.Core" Version="1.12.0.2" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.Bindings.targets" />
</Project>
</Project>
2 changes: 1 addition & 1 deletion OneSignal.Android.Binding/Transforms/EnumFields.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
and Fragment_tag from android.support.v4.app.FragmentActivity.FragmentTag
to an enum called Android.Support.V4.App.FragmentTagType with values
Id, Name, and Tag.
<mapping clr-enum-type="Android.Support.V4.App.FragmentTagType" jni-class="android/support/v4/app/FragmentActivity$FragmentTag">
<field clr-name="Id" jni-name="Fragment_id" value="1" />
<field clr-name="Name" jni-name="Fragment_name" value="0" />
Expand Down
17 changes: 17 additions & 0 deletions OneSignalSDK.Xamarin.Android/NotificationExtensionAttribute.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Diagnostics;
using Android.App;
using Android.Content;

namespace Com.OneSignal.Android
{
[Serializable]
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
public sealed class NotificationExtensionAttribute : Attribute, Java.Interop.IJniNameProviderAttribute
{
public string Name { get; set; }
public NotificationExtensionAttribute()
{
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@
</Compile>
<Compile Include="Utilities\NativeConversion.cs" />
<Compile Include="OneSignalCallbacks.cs" />
<Compile Include="NotificationExtensionAttribute.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OneSignal.Android.Binding\OneSignal.Android.Binding.csproj">
Expand Down Expand Up @@ -371,4 +372,4 @@
<Import Project="..\packages\Xamarin.Jetbrains.Annotations.22.0.0.2\build\monoandroid90\Xamarin.Jetbrains.Annotations.targets" Condition="Exists('..\packages\Xamarin.Jetbrains.Annotations.22.0.0.2\build\monoandroid90\Xamarin.Jetbrains.Annotations.targets')" />
<Import Project="..\packages\Xamarin.Kotlin.StdLib.1.5.31.2\build\monoandroid90\Xamarin.Kotlin.StdLib.targets" Condition="Exists('..\packages\Xamarin.Kotlin.StdLib.1.5.31.2\build\monoandroid90\Xamarin.Kotlin.StdLib.targets')" />
<Import Project="..\packages\Xamarin.Kotlin.StdLib.Common.1.5.31.2\build\monoandroid90\Xamarin.Kotlin.StdLib.Common.targets" Condition="Exists('..\packages\Xamarin.Kotlin.StdLib.Common.1.5.31.2\build\monoandroid90\Xamarin.Kotlin.StdLib.Common.targets')" />
</Project>
</Project>

0 comments on commit c38ccc1

Please sign in to comment.