thomasgalliker / Plugin.FirebasePushNotifications

Receive and handle firebase push notifications in .NET MAUI apps
MIT License
65 stars 5 forks source link

[Bug] Sample project fails to accept google-services.json file build property GoogleServicesJson #75

Closed swagdkau closed 3 weeks ago

swagdkau commented 1 month ago

Description

Trying to run the standard sample project from Plugin.FirebasePushNotifications. The files google-services,json is missing (in git ignore) - but I add the one that works for .NET 7.0. Code builds without problems Sample App Launches on Device target (Android 14, Samsung A52) Fails In the code FirebasePushNotificationManager.cs lines 48 "FirebaseMessaging.Instance.AutoInitEnabled = this.options.AutoInitEnabled;" it fails with the exception : "Java.Lang.IllegalStateException: 'Default FirebaseApp is not initialized in this process com.companyname.firebasepushdemo. Make sure to call FirebaseApp.initializeApp(Context) first.'"

Output: Start debugging Android application ... Forwarding debugger port 8887 Detecting existing process

am start -a "android.intent.action.MAIN" -c "android.intent.category.LAUNCHER" -n "com.companyname.firebasepushdemo/crc6438426b1ff94f23b0.MainActivity" Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.companyname.firebasepushdemo/crc6438426b1ff94f23b0.MainActivity } Loaded assembly: System.Private.CoreLib.dll [External] Loaded assembly: MauiSampleApp.dll Loaded assembly: Mono.Android.dll [External] Loaded assembly: System.Runtime.dll [External] Loaded assembly: Java.Interop.dll [External] Loaded assembly: System.Runtime.InteropServices.dll [External] Resolved pending breakpoint for 'Android.Runtime.JNIEnvInit.RegisterJniNatives(System.IntPtr, System.Int32, System.IntPtr, System.IntPtr, System.Int32)' to /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNIEnvInit.cs:57 [0x00000]. Loaded assembly: System.Collections.dll [External] Loaded assembly: Mono.Android.Runtime.dll [External] Loaded assembly: System.Threading.dll [External] Loaded assembly: System.Threading.Thread.dll [External] Loaded assembly: System.Diagnostics.StackTrace.dll [External] Loaded assembly: data-0xb400007ab869b050 [External] Loaded assembly: data-0xb400007ab86bb070 [External] Loaded assembly: data-0xb400007c8fb70650 [External] Loaded assembly: netstandard.dll [External] Loaded assembly: System.Linq.dll [External] Loaded assembly: System.Collections.Concurrent.dll [External] Resolved pending breakpoint for 'Xamarin.HotReload.HotReloadAgent.BreakpointSendToIde(System.String)' to D:\a_work\1\s\HotReload\Source\Xamarin.HotReload.Agent\HotReloadAgent.cs:425 [0x00000]. Loaded assembly: System.Text.Json.dll [External] Loaded assembly: System.Text.Encodings.Web.dll [External] Loaded assembly: System.Runtime.Loader.dll [External] Loaded assembly: System.ComponentModel.dll [External] Loaded assembly: Microsoft.Maui.Controls.dll [External] Loaded assembly: System.ObjectModel.dll [External] Loaded assembly: Microsoft.Maui.dll [External] Loaded assembly: Microsoft.Maui.Graphics.dll [External] Loaded assembly: Microsoft.Maui.Essentials.dll [External] Loaded assembly: Microsoft.Extensions.Logging.Abstractions.dll [External] Resolved pending breakpoint for 'Xamarin.HotReload.HotReloadAgent.BreakpointCheckpoint()' to D:\a_work\1\s\HotReload\Source\Xamarin.HotReload.Agent\HotReloadAgent.cs:420 [0x00000]. Loaded assembly: System.Memory.dll [External] Loaded assembly: System.Reflection.Emit.Lightweight.dll [External] [irebasepushdemo] Late-enabling -Xcheck:jni [irebasepushdemo] Using CollectorTypeCC GC. [CompatibilityChangeReporter] Compat change id reported: 171979766; UID 10599; state: ENABLED [CompatibilityChangeReporter] Compat change id reported: 242716250; UID 10599; state: ENABLED [nativeloader] Configuring clns-4 for other apk /system/framework/org.apache.http.legacy.jar. target_sdk_version=34, uses_libraries=ALL, library_path=/data/app/D99EXbEq6AcOP2cSSpnGRQ==/com.companyname.firebasepushdemo-9XMJO_i3H5J5hWjzpG8eDg==/lib/arm64:/data/app/D99EXbEq6AcOP2cSSpnGRQ==/com.companyname.firebasepushdemo-9XMJO_i3H5J5hWjzpG8eDg==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand:/data/user/0/com.companyname.firebasepushdemo [nativeloader] Extending system_exposed_libraries: libSEF.quram.so:libimagecodec.quram.so:libagifencoder.quram.so:libaudiomirroring_jni.audiomirroring.samsung.so:libsce_v1.crypto.samsung.so:libperfsdk.performance.samsung.so:libveframework.videoeditor.samsung.so:libknox_remotedesktopclient.knox.samsung.so:libSDKRecognitionText.spensdk.samsung.so:lib_vnd_client.dk.samsung.so:lib_native_client.dk.samsung.so:lib_nativeJni.dk.samsung.so:libhumantracking.arcsoft.so:libPortraitDistortionCorrection.arcsoft.so:libPortraitDistortionCorrectionCali.arcsoft.so:libface_landmark.arcsoft.so:libFacialStickerEngine.arcsoft.so:libveengine.arcsoft.so:libimage_enhancement.arcsoft.so:liblow_light_hdr.arcsoft.so:libhigh_dynamic_range.arcsoft.so:libFacialAttributeDetection.arcsoft.so:libBeauty_v4.camera.samsung.so:libexifa.camera.samsung.so:libjpega.camera.samsung.so:libOpenCv.camera.samsung.so:libImageScreener.camera.samsung.so:libMyFilter.camera.samsung.so:libtensorflowLite.myfilter.camera.samsung.so:libtensorflowlite_inference_api.myfilter.cam [ziparchive] Unable to open '/data/app/~~D99EXbEq6AcOP2cSSpnGRQ==/com.companyname.firebasepushdemo-9XMJO_i3H5J5hWjzpG8eDg==/base.dm': No such file or directory [ziparchive] Unable to open '/data/app/~~D99EXbEq6AcOP2cSSpnGRQ==/com.companyname.firebasepushdemo-9XMJO_i3H5J5hWjzpG8eDg==/base.dm': No such file or directory [nativeloader] Configuring clns-5 for other apk /data/app/D99EXbEq6AcOP2cSSpnGRQ==/com.companyname.firebasepushdemo-9XMJO_i3H5J5hWjzpG8eDg==/base.apk. target_sdk_version=34, uses_libraries=, library_path=/data/app/D99EXbEq6AcOP2cSSpnGRQ==/com.companyname.firebasepushdemo-9XMJO_i3H5J5hWjzpG8eDg==/lib/arm64:/data/app/~~D99EXbEq6AcOP2cSSpnGRQ==/com.companyname.firebasepushdemo-9XMJO_i3H5J5hWjzpG8eDg==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand:/data/user/0/com.companyname.firebasepushdemo [GraphicsEnvironment] Currently set values for: [GraphicsEnvironment] angle_gl_driver_selection_pkgs=[] [GraphicsEnvironment] angle_gl_driver_selection_values=[] [GraphicsEnvironment] ANGLE GameManagerService for com.companyname.firebasepushdemo: false [GraphicsEnvironment] com.companyname.firebasepushdemo is not listed in per-application setting [GraphicsEnvironment] Updatable production driver is not supported on the device. [MultiDex] VM with version 2.1.0 has multidex support [MultiDex] install [MultiDex] VM has multidex support, MultiDex support library is disabled. [DOTNET] JNI_OnLoad: JNI_OnLoad in pal_jni.c [DOTNET] GetOptionalClassGRef: optional class com/android/org/conscrypt/OpenSSLEngineImpl was not found [monodroid] Creating public update directory: /data/user/0/com.companyname.firebasepushdemo/files/.__override__ [irebasepushdemo] Attempt to remove non-JNI local reference [monodroid-debug] Trying to initialize the debugger with options: --debugger-agent=transport=dt_socket,loglevel=0,address=127.0.0.1:8887,server=y,embedding=1,timeout=1729076902 [monodroid-gc] GREF GC Threshold: 46080 [irebasepushdemo] Attempt to remove non-JNI local reference [monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.VisualStudio.DesignTools.TapContract.dll [monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.VisualStudio.DesignTools.TapContract.dll [monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.VisualStudio.DesignTools.MobileTapContracts.dll [monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.VisualStudio.DesignTools.MobileTapContracts.dll [monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.VisualStudio.DesignTools.MobileTapContracts.dll [monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.VisualStudio.DesignTools.MobileTapContracts.dll [monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.VisualStudio.DesignTools.TapContract.dll [monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.VisualStudio.DesignTools.TapContract.dll Loaded assembly: System.Reflection.Emit.ILGeneration.dll [External] Loaded assembly: System.Reflection.Primitives.dll [External] [FirebaseApp] Default FirebaseApp failed to initialize because no default options were found. This usually means that com.google.gms:google-services was not applied to your gradle project. [FirebaseInitProvider] FirebaseApp initialization unsuccessful [Sentry] io.sentry.auto-init read: false [Sentry] Retrieving auto-init from AndroidManifest.xml Loaded assembly: Xamarin.AndroidX.Core.dll [External] Loaded assembly: Microsoft.Extensions.DependencyInjection.Abstractions.dll [External] Loaded assembly: System.Console.dll [External] Loaded assembly: Microsoft.Maui.Controls.Xaml.dll [External] Loaded assembly: CommunityToolkit.Maui.dll [External] Loaded assembly: CommunityToolkit.Maui.Core.dll [External] Loaded assembly: Plugin.FirebasePushNotifications.dll Loaded assembly: Microsoft.Extensions.Configuration.dll [External] Loaded assembly: Microsoft.Extensions.Configuration.Abstractions.dll [External] Loaded assembly: Microsoft.Extensions.Logging.dll [External] Loaded assembly: CommunityToolkit.Mvvm.dll [External] Loaded assembly: Xamarin.AndroidX.AppCompat.dll [External] Loaded assembly: Xamarin.Google.Android.Material.dll [External] Loaded assembly: Xamarin.AndroidX.SwipeRefreshLayout.dll [External] Loaded assembly: System.ComponentModel.TypeConverter.dll [External] Loaded assembly: System.Private.Uri.dll [External] Loaded assembly: Xamarin.AndroidX.Fragment.dll [External] Loaded assembly: Xamarin.AndroidX.Activity.dll [External] Loaded assembly: Xamarin.AndroidX.Lifecycle.ViewModel.dll [External] Loaded assembly: Xamarin.AndroidX.Lifecycle.Common.dll [External] Loaded assembly: Xamarin.AndroidX.SavedState.dll [External] Loaded assembly: Xamarin.AndroidX.DrawerLayout.dll [External] Loaded assembly: Xamarin.AndroidX.CustomView.dll [External] Loaded assembly: Xamarin.AndroidX.Navigation.Runtime.dll [External] Loaded assembly: System.Net.Primitives.dll [External] Loaded assembly: Microsoft.Extensions.Options.dll [External] Loaded assembly: Microsoft.Extensions.Logging.Debug.dll [External] Loaded assembly: NLog.dll [External] Loaded assembly: NLog.Extensions.Logging.dll [External] Loaded assembly: Sentry.Extensions.Logging.dll [External] Loaded assembly: Sentry.dll [External] Loaded assembly: System.Xml.ReaderWriter.dll [External] Loaded assembly: System.Private.Xml.dll [External] Loaded assembly: System.Text.RegularExpressions.dll [External] Loaded assembly: System.IO.FileSystem.Watcher.dll [External] Loaded assembly: System.ComponentModel.Primitives.dll [External] Loaded assembly: Microsoft.Extensions.Logging.Configuration.dll [External] Loaded assembly: Microsoft.Extensions.Http.dll [External] Loaded assembly: Microsoft.Extensions.DependencyInjection.dll [External] Loaded assembly: System.Diagnostics.Tracing.dll [External] Loaded assembly: System.Text.Encoding.Extensions.dll [External] [monodroid-assembly] open_from_bundles: failed to load assembly da-DK/System.Private.CoreLib.resources.dll [monodroid-assembly] open_from_bundles: failed to load assembly da-DK/System.Private.CoreLib.resources.dll [monodroid-assembly] open_from_bundles: failed to load assembly da/System.Private.CoreLib.resources.dll [monodroid-assembly] open_from_bundles: failed to load assembly da/System.Private.CoreLib.resources.dll Loaded assembly: System.Numerics.Vectors.dll [External] Loaded assembly: mscorlib.dll [External] Loaded assembly: System.dll [External] [irebasepushdemo] Explicit concurrent copying GC freed 19371(1467KB) AllocSpace objects, 0(0B) LOS objects, 71% free, 2423KB/8567KB, paused 100us,23us total 46.939ms Loaded assembly: ValueConverters.dll [External] Thread started: #2 Thread started: #3 Thread started: #4 Loaded assembly: System.Runtime.Serialization.Json.dll [External] Loaded assembly: System.Private.DataContractSerialization.dll [External] Loaded assembly: System.Runtime.Serialization.Xml.dll [External] Loaded assembly: System.Runtime.Serialization.Primitives.dll [External] [monodroid-assembly] open_from_bundles: failed to load assembly da-DK/System.Private.DataContractSerialization.resources.dll [monodroid-assembly] open_from_bundles: failed to load assembly da-DK/System.Private.DataContractSerialization.resources.dll [monodroid-assembly] open_from_bundles: failed to load assembly da/System.Private.DataContractSerialization.resources.dll [monodroid-assembly] open_from_bundles: failed to load assembly da/System.Private.DataContractSerialization.resources.dll Loaded assembly: System.Runtime.Intrinsics.dll [External] Loaded assembly: Microsoft.Extensions.Primitives.dll [External] Loaded assembly: System.IO.Compression.dll [External] Loaded assembly: System.Net.Http.dll [External] Loaded assembly: System.Reflection.Metadata.dll [External] Loaded assembly: Sentry.Android.AssemblyReader.dll [External] Loaded assembly: Microsoft.Extensions.Configuration.Binder.dll [External] Loaded assembly: Sentry.Bindings.Android.dll [External] [irebasepushdemo] Accessing hidden field Landroid/view/Choreographer;->mLastFrameTimeNanos:J (unsupported, reflection, allowed) Loaded assembly: System.Net.WebProxy.dll [External] [ConnectivityManager] StackLog: [android.net.ConnectivityManager.sendRequestForNetwork(ConnectivityManager.java:4412)] [android.net.ConnectivityManager.registerDefaultNetworkCallbackForUid(ConnectivityManager.java:4976)] [android.net.ConnectivityManager.registerDefaultNetworkCallback(ConnectivityManager.java:4943)] [android.net.ConnectivityManager.registerDefaultNetworkCallback(ConnectivityManager.java:4917)] [io.sentry.android.core.internal.util.AndroidConnectionStatusProvider.registerNetworkCallback(AndroidConnectionStatusProvider.java:307)] [io.sentry.android.core.internal.util.AndroidConnectionStatusProvider.addConnectionStatusObserver(AndroidConnectionStatusProvider.java:97)] [io.sentry.android.core.SendCachedEnvelopeIntegration.lambda$sendCachedEnvelopes$0(SendCachedEnvelopeIntegration.java:98)] [io.sentry.android.core.SendCachedEnvelopeIntegration.$r8$lambda$wYB39ORRoqNaLHzP2Y7j0NfElsw(Unknown Source:0)] [io.sentry.android.core.SendCachedEnvelopeIntegration$$ExternalSyntheticLambda0.run(Unknown Source:6)] [java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:487)] [java.util.concurrent.FutureTask.run(FutureTask.java:264)] [java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307)] [java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)] [java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)] [java.lang.Thread.run(Thread.java:1012)] [ConnectivityManager] StackLog: [android.net.ConnectivityManager.sendRequestForNetwork(ConnectivityManager.java:4412)] [android.net.ConnectivityManager.registerDefaultNetworkCallbackForUid(ConnectivityManager.java:4976)] [android.net.ConnectivityManager.registerDefaultNetworkCallback(ConnectivityManager.java:4943)] [android.net.ConnectivityManager.registerDefaultNetworkCallback(ConnectivityManager.java:4917)] [io.sentry.android.core.internal.util.AndroidConnectionStatusProvider.registerNetworkCallback(AndroidConnectionStatusProvider.java:307)] [io.sentry.android.core.NetworkBreadcrumbsIntegration.register(NetworkBreadcrumbsIntegration.java:77)] [io.sentry.Sentry.init(Sentry.java:255)] [io.sentry.Sentry.init(Sentry.java:167)] [io.sentry.android.core.SentryAndroid.init(SentryAndroid.java:94)] [io.sentry.android.core.SentryAndroid.init(SentryAndroid.java:77)] [crc6488302ad6e9e4df1a.MauiApplication.n_onCreate(Native Method)] [crc6488302ad6e9e4df1a.MauiApplication.onCreate(MauiApplication.java:28)] [android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1316)] [android.app.ActivityThread.handleBindApplication(ActivityThread.java:7711)] [android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)] [android.app.ActivityThread$H.handleMessage(ActivityThread.java:2478)] Thread started: #5 Thread started: .NET TP Gate #6 Thread started: #7 Loaded assembly: System.Security.Cryptography.dll [External] [ConnectivityManager] StackLog: [android.net.ConnectivityManager.sendRequestForNetwork(ConnectivityManager.java:4412)] [android.net.ConnectivityManager.registerDefaultNetworkCallbackForUid(ConnectivityManager.java:4976)] [android.net.ConnectivityManager.registerDefaultNetworkCallback(ConnectivityManager.java:4943)] [android.net.ConnectivityManager.registerDefaultNetworkCallback(ConnectivityManager.java:4917)] [io.sentry.android.core.internal.util.AndroidConnectionStatusProvider.registerNetworkCallback(AndroidConnectionStatusProvider.java:307)] [io.sentry.android.core.internal.util.AndroidConnectionStatusProvider.addConnectionStatusObserver(AndroidConnectionStatusProvider.java:97)] [io.sentry.android.core.SendCachedEnvelopeIntegration.lambda$sendCachedEnvelopes$0(SendCachedEnvelopeIntegration.java:98)] [io.sentry.android.core.SendCachedEnvelopeIntegration.$r8$lambda$wYB39ORRoqNaLHzP2Y7j0NfElsw(Unknown Source:0)] [io.sentry.android.core.SendCachedEnvelopeIntegration$$ExternalSyntheticLambda0.run(Unknown Source:6)] [java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:487)] [java.util.concurrent.FutureTask.run(FutureTask.java:264)] [java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307)] [java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)] [java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)] [java.lang.Thread.run(Thread.java:1012)] Thread started: #8 Loaded assembly: System.Diagnostics.DiagnosticSource.dll [External] Loaded assembly: System.Collections.NonGeneric.dll [External] Loaded assembly: System.Net.Requests.dll [External] Loaded assembly: System.Net.Security.dll [External] Loaded assembly: Newtonsoft.Json.dll [External] Loaded assembly: Xamarin.Firebase.Common.dll [External] Loaded assembly: Xamarin.Firebase.Messaging.dll [External] Thread started: .NET Timer #9 Java.Lang.IllegalStateException: 'Loading...'

The thread 8 has exited with code 0 (0x0). Thread finished: #8 [TrafficStats] tagSocket(97) with statsTag=0xffffffff, statsUid=-1 [CompatibilityChangeReporter] Compat change id reported: 263076149; UID 10599; state: ENABLED [TrafficStats] tagSocket(97) with statsTag=0xffffffff, statsUid=-1

Steps to Reproduce

Using VS 2022 17.11.5 on Windows 11 Pro Xamarin 17.11..0.98 Xamarin.Android SDK

1) Cloning github repo Plugin.FirebasePushNotifications using git. 2) Starting in Visual Studio 2022 3) Adding own google-services.json file - which works with a different API in .NET 6.0 MAUI - tested using FCM API. I am adding it under Platforms/Android/Resources as instructed. 4) I am NOT allowed to apply the build action GoogleServicesJson in the property of the file. This could be indicative of the problem. Several suggestions can be Googled - none works. Guess some work around exists - since last code update was made 2 days ago. 5) Instead added manually 6) Code fails in FirebasePushNotificationManager.cs lines 48 "FirebaseMessaging.Instance.AutoInitEnabled = this.options.AutoInitEnabled;" it fails with the exception : "Java.Lang.IllegalStateException: 'Default FirebaseApp is not initialized in this process com.companyname.firebasepushdemo. Make sure to call FirebaseApp.initializeApp(Context) first.'"

Expected Behavior

That the app would build and run. Maybe allow me to set build action on file google-services.json

Actual Behavior

Code fails in FirebasePushNotificationManager.cs lines 48 "FirebaseMessaging.Instance.AutoInitEnabled = this.options.AutoInitEnabled;" it fails with the exception : "Java.Lang.IllegalStateException: 'Default FirebaseApp is not initialized in this process com.companyname.firebasepushdemo. Make sure to call FirebaseApp.initializeApp(Context) first.'"

  1. Basic Information

Screenshots, Attachments, Links

swagdkau commented 1 month ago

Should mention that we are running .NET 8.0 for both Android and iOS - all newest version and newest VS 2022 (as indicated in the original edit). I can supplement and say - that for iOS .NET 8.0 - the sample app works out of the box. Thus, the problem seems to be related to the file google-services,json - and in particular - that in .NET 8.0, we cannot add the build action GoogleServicesJson in Visual Studio 2022. This indicates to me that something is broken in the automated loading of the file. A new feature that would allow us to manually add the parameters would be a great example and allow us to test Firebase Push end-2-end.

thomasgalliker commented 1 month ago

Ok. Yes I've seen this in the past, that VS2022 doesn't give the build action GoogleServicesJson. You can copy the build statements from the sample app, I think VS should still be smart enough to treat those files as GoogleServicesJson after that:

<ItemGroup Condition="$(TargetFramework.Contains('-android'))">
    <GoogleServicesJson Include="Platforms\Android\Resources\google-services.json" Link="Platforms\Android\Resources\google-services.json" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.Contains('-ios'))">
    <BundleResource Include="Platforms\iOS\GoogleService-Info.plist" Link="GoogleService-Info.plist" />
</ItemGroup>

Regarding the Firebase options: Good idea. So you'd like to provide the Firebase options in code rather than providing a google-services.json file, right? I think there is an option in FirebaseApp.Initialize(...) method, but I'd have to research about it. Let's open a new issue where we describe the enhancement.

Do I understand you correctly, that this issue is actually solved?

swagdkau commented 1 month ago

Already tried all that.

Did not work.

Actually, the build actions are already in your Github project file.

I suspect there is some library that I am missing – and the lack of the build action is what is causing this.

I have the exact same problem (on Android) with .NET 8.0 on other frameworks. In .NET 8.0 – the file is simply never read. However, rolling back to .NET 6.0 – it works !!!

But, let us leave it be. I have it working on iOS .NET 8.0 – which is really want I wanted. The Android was just to get a reference for comparing how it works.

Thank you for your time.

PS Andrew Richie from Shiny says – that Firebase Push notifications are not working for them on Android – but Azure Push Notifications are … This indicates that Microsoft broke something. Would not be the first time 😉

Kind regards,

Stefan Wagner, PhD Associate Professor Biomedical Section Department of Electrical and Computer Engineering Aarhus University

Phone: +45 4189 3254 Email: @.***

Head of Biomedical & Pervasive Systemshttps://ece.au.dk/forskning/forsknings-og-udviklingsomraader/biomedical-engineering/research-groups/biomedical-pervasive-systems/ Research Group Head of Ambient Assisted Living Lab From: Thomas Galliker @.> Sent: Friday, October 18, 2024 11:28 AM To: thomasgalliker/Plugin.FirebasePushNotifications @.> Cc: Stefan Rahr Wagner @.>; Author @.> Subject: Re: [thomasgalliker/Plugin.FirebasePushNotifications] [Bug] Sample project fails to accept google-services.json file build property GoogleServicesJson (Issue #75)

Ok. Yes I've seen this in the past, that VS2022 doesn't give the build action GoogleServicesJson. You can copy the build statements from the sample app, I think VS should still be smart enough to treat those files as GoogleServicesJson after that:

Regarding the Firebase options: Good idea. So you'd like to provide the Firebase options in code rather than providing a google-services.json file, right? I think there is an option in FirebaseApp.Initialize(...) method, but I'd have to research about it. Let's open a new issue where we describe the enhancement.

Do I understand you correctly, that this issue is actually solved?

— Reply to this email directly, view it on GitHubhttps://github.com/thomasgalliker/Plugin.FirebasePushNotifications/issues/75#issuecomment-2421957997, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AY4UTA3ON7ILELWS4DZVTJ3Z4DIALAVCNFSM6AAAAABQBIDHLSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRRHE2TOOJZG4. You are receiving this because you authored the thread.Message ID: @.**@.>>

thomasgalliker commented 3 weeks ago

The latest 2.5.x stable version has an improved bootstrap procedure with more logging during startup. If you configure Microsoft.Extensions.Logging in your app, observe what log output you receive during the startup of your app.

If there are unsolvable troubles, please don't hesitate to ask again. Since I cannot reproduce this issue, I'm going to close it for now.

swagdkau commented 3 weeks ago

Thank you Thomas. "Do I understand you correctly, that this issue is actually solved?" The build action still does not work for me in the Android project, but your sample app works on iOS, which is where I really need it. I only started with Android to have an AB reference. I will leave the Android solution for the future.

"Regarding the Firebase options: Good idea. So you'd like to provide the Firebase options in code rather than providing a google-services.json file, right? I think there is an option in FirebaseApp.Initialize(...) method, but I'd have to research about it. Let's open a new issue where we describe the enhancement."

Exactly. I would actually rather want to feed this information from a server or a settings file, rather than from a firebase generated file. It is only a few fields that are actually relevant. I just found it strange that this is not an option.

Thank you for your time.

swagdkau commented 3 weeks ago

Great. Thank you.

Kind regards,

Stefan Wagner, PhD Associate Professor Biomedical Section Department of Electrical and Computer Engineering Aarhus University

Phone: +45 4189 3254 Email: @.***

Head of Biomedical & Pervasive Systemshttps://ece.au.dk/forskning/forsknings-og-udviklingsomraader/biomedical-engineering/research-groups/biomedical-pervasive-systems/ Research Group Head of Ambient Assisted Living Lab From: Thomas Galliker @.> Sent: Tuesday, October 29, 2024 11:17 AM To: thomasgalliker/Plugin.FirebasePushNotifications @.> Cc: Stefan Rahr Wagner @.>; Author @.> Subject: Re: [thomasgalliker/Plugin.FirebasePushNotifications] [Bug] Sample project fails to accept google-services.json file build property GoogleServicesJson (Issue #75)

The latest 2.5.x stable version has an improved bootstrap procedure with more logging during startup. If you configure Microsoft.Extensions.Logging in your app, observe what log output you receive during the startup of your app.

If there are unsolvable troubles, please don't hesitate to ask again. Since I cannot reproduce this issue, I'm going to close it for now.

- Reply to this email directly, view it on GitHubhttps://github.com/thomasgalliker/Plugin.FirebasePushNotifications/issues/75#issuecomment-2443804976, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AY4UTAZPOOTKDUODILWZOH3Z55ODDAVCNFSM6AAAAABQBIDHLSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINBTHAYDIOJXGY. You are receiving this because you authored the thread.Message ID: @.**@.>>