-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed permission issue & Bump version from '2.0.5.2' to '2.0.5.3'
- Loading branch information
Showing
11 changed files
with
152 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
Sample/Xamarin/LocalNotificationsSample.Android/Properties/AndroidManifest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="e_intidata.localnotificationssample"> | ||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="31" /> | ||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="33" /> | ||
<application android:label="LocalNotificationsSample.Android" android:theme="@style/MainTheme"></application> | ||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | ||
<!--https://stackoverflow.com/questions/71031091/android-12-using-schedule-exact-alarm-permission-to-get-show-data-at-specific-t--> | ||
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM"/> | ||
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" /> | ||
</manifest> |
21 changes: 20 additions & 1 deletion
21
Sample/Xamarin/LocalNotificationsSample.Android/Resources/Resource.designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace LocalNotifications | ||
{ | ||
public class NotificationPermission | ||
{ | ||
public bool AskPermission { get; set; } = true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
Source/LocalNotifications/Platform/Droid/NotificationPermissionAndroid.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using Android; | ||
using Android.OS; | ||
using System; | ||
using System.Collections.Generic; | ||
using Xamarin.Essentials; | ||
|
||
namespace LocalNotifications.Platform.Droid | ||
{ | ||
public partial class NotificationPermissionAndroid : Permissions.BasePlatformPermission | ||
{ | ||
public override (string androidPermission, bool isRuntime)[] RequiredPermissions | ||
{ | ||
get | ||
{ | ||
var result = new List<(string androidPermission, bool isRuntime)>(); | ||
if ((int)Build.VERSION.SdkInt >= 33) | ||
{ | ||
result.Add((Manifest.Permission.PostNotifications, true)); | ||
} | ||
return result.ToArray(); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters