Skip to content

Commit

Permalink
Add appactions intent filter
Browse files Browse the repository at this point in the history
  • Loading branch information
aritchie committed Nov 5, 2023
1 parent 3060a12 commit e7dc302
Showing 1 changed file with 9 additions and 24 deletions.
33 changes: 9 additions & 24 deletions ProjectTemplates/ShinyApp/Platforms/Android/MainActivity.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Android.App;
using Android.OS;
using Android.Content.PM;
using Microsoft.Maui.ApplicationModel;
#if (usemsal)
using Android.Content;
using Android.Runtime;
Expand All @@ -21,35 +22,19 @@ namespace ShinyApp;
ConfigChanges.SmallestScreenSize |
ConfigChanges.Density
)]
#if (usepush && notifications)
[IntentFilter(
new[] {
ShinyPushIntents.NotificationClickAction,
ShinyNotificationIntents.NotificationClickAction
},
Categories = new[] {
"android.intent.category.DEFAULT"
}
)]
#elif (usepush)
[IntentFilter(
new[] {
ShinyPushIntents.NotificationClickAction
},
Categories = new[] {
"android.intent.category.DEFAULT"
}
)]
#elif (notifications)
[IntentFilter(
new[] {
ShinyNotificationIntents.NotificationClickAction
},
Platform.Intent.ActionAppAction
#elif (usepush)
, ShinyPushIntents.NotificationClickAction
#endif
#if (notifications)
, ShinyNotificationIntents.NotificationClickAction
#endif
Categories = new[] {
"android.intent.category.DEFAULT"
global::Android.Content.Intent.CategoryDefault
}
)]
#endif
public class MainActivity : MauiAppCompatActivity
{
#if (flipper)
Expand Down

0 comments on commit e7dc302

Please sign in to comment.