Closed nickdavidbhs closed 5 months ago
There was a default value for the intent that I believe I missed in 3.3.2. You can give 3.3.3-beta a try, revert to 3.3.0 or set a default intent in your AddPush statement using #if ANDROID compiler directives. Please view the source if you don't understand the final option
Amazing, worked good on Beta 3.3.3
Component/Nuget
Push - Native (Shiny.Push)
What operating system(s) are effected?
Version(s) of Operation Systems
Android 13
Hosting Model
Steps To Reproduce
Execute the App. Send to background. Push the Firebase Notification. Tap the notification on device
Expected Behavior
The app to run. Activate the android Intent. Run the method OnEntry from the delegate
Actual Behavior
The app runs There is no intent. So, no OnEntry called
Exception or Log output
No Exception
Code Sample
Here a link to a GitHub with the project: https://github.com/nickdavidbhs/My-Shiny.git
The project works good in iPhone running the calls with Apns. On Android the OnReceived method works good. Only this call fails.
For security reasons removed the google service json, due to the api key. And renamed the App Id to com.Shiny.Implementation
Relevant things:
This Is my Android Main Activity
`using Android.App; using Android.Content.PM; using Android.OS; using Firebase;
namespace Shiny_Implementation;
[Activity( Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)] [IntentFilter( new[] { Shiny.ShinyPushIntents.NotificationClickAction }, Categories = new[] { "android.intent.category.DEFAULT" } )] public class MainActivity : MauiAppCompatActivity { protected override void OnCreate(Bundle? savedInstanceState) { base.OnCreate(savedInstanceState);
}`
As can be seen, I have the click action for the intent and the category.
The Android Manifest
`<?xml version="1.0" encoding="utf-8"?>