It works, however an annoying notification will always appear sticky on your phone, is there any way to make a REAL background service and not a foreground service? I want to be able to display notifications on the app, without a foreground notification service. The title isn't very good explicit.
Amazing tutorial. Just implemented SignalR to show an Alert in my MAUI app, but was thinking of exactly this functionality. After a quick browse I came here. Everything is there. Not as simple as I imagined it. Hopefully I'll find the same for Windows and iOS. Thanks a lot.
@DeveloperExpress, I'm running into an issue where after the app's closed and I get a notification, if I click the notification the app tries to launch but then gets stuck and crashes. Any insights?
It would be nice to have some more details in regards to the warnings about not using it in production due to security concerns. It is not clear to me what are the details about the security concern or what needs to be done to mitigate that concern.
Thank you Carl!! Exellent work!! Background jobs are very important in mobile apps. I wonder if there is any ready-made library for this purpose. I looked for shiny-jobs. I don't think that it works very well. Do you have found any other libraries for net maui?
I don't see why not, although iOS is a completely different beast when it comes to notifications. If your goal is to show notifications, there's a completely different process you need to go through. If you just want some kind of background service, as I showed in Android, it's possible, but you have to jump through hoops to make sure iOS doesn't shut you down. I'm struggling with the process, but I'll do a show on it when I get some answers.
This video is exactly what I need for my project, but unfortunately I can't get the boot receiver working - it throws a Permission Denial exception at startup. I thought I must have missed something but it does the same running the code from github. Any ideas please? Security exception: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.companyname.mauiandroidfs/crc642c2de4fd9814d752.MainActivity } from null (pid=20066, uid=2000) requires android.permission.RECEIVE_BOOT_COMPLETED java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.companyname.mauiandroidfs/crc642c2de4fd9814d752.MainActivity } from null (pid=20066, uid=2000) requires android.permission.RECEIVE_BOOT_COMPLETED
Working on it. iOS has an official process for notifications, so I'm first going to focus on background services, which have to continuously restart themselves to avoid being shut down by the OS.
Would have been nice if there actually was something about a background service. I'm aware of the distinction and was actually looking for background service information, not foreground...
you can extend the foreground service by implementing Android.Content.BroadcastReceiver that receives SCREEN_OFF event and when it does acquire Android.OS.PowerManager.WakeLock with WakeLockFlags.Partial. then it will run all the time.
Thank you @Carl Franklin, please add background services for iOS this will really help!
He's working on it.
@@DeveloperExpress Thank you so much really appreciate!
Hi @@DeveloperExpress, any update on an iOS version? It'd be really helpful
@@DeveloperExpressIs there any progress on this? There's no really helpful guidance I can find anywhere else.
Can you make one about IOS ?
Thanks
It works, however an annoying notification will always appear sticky on your phone, is there any way to make a REAL background service and not a foreground service?
I want to be able to display notifications on the app, without a foreground notification service. The title isn't very good explicit.
I don't remember how to do it atm. but there is a way to set it without the annoying notification.
Amazing tutorial. Just implemented SignalR to show an Alert in my MAUI app, but was thinking of exactly this functionality. After a quick browse I came here. Everything is there. Not as simple as I imagined it. Hopefully I'll find the same for Windows and iOS. Thanks a lot.
Not at all as simple for iOS. I'm still trying to figure that out.
Hi Thanks for sharing the video. I have a small Doubt Can we have implement Dependency Injection to this Backgroud Service
@DeveloperExpress, I'm running into an issue where after the app's closed and I get a notification, if I click the notification the app tries to launch but then gets stuck and crashes. Any insights?
did you find a solution I am having the same issue.
Not working with api 33/34 working fine with api 31 any solution for new api?
Have you found a solution?
@@RickardApps I have the same problem
It would be nice to have some more details in regards to the warnings about not using it in production due to security concerns. It is not clear to me what are the details about the security concern or what needs to be done to mitigate that concern.
Hi how to disable the background service is running notification in this solution can you please help me
Great video. Would really love to see one on Home Screen Widgets, something a lot of us would love to do.
Can we add a right click event to this background application? For android
Thank you Carl!! Exellent work!! Background jobs are very important in mobile apps. I wonder if there is any ready-made library for this purpose. I looked for shiny-jobs. I don't think that it works very well. Do you have found any other libraries for net maui?
No, I couldn't find any. That's why I wrote it myself. :)
@@carlfranklin7894 Thank you Carl! Can you create a ready library for this? Like a nuget? Or to add it via devexpress maui libraries in future.
Can the same done for Windows?
Carl, one question, hubConnections work with SignalR on iOS?
I don't see why not, although iOS is a completely different beast when it comes to notifications. If your goal is to show notifications, there's a completely different process you need to go through. If you just want some kind of background service, as I showed in Android, it's possible, but you have to jump through hoops to make sure iOS doesn't shut you down. I'm struggling with the process, but I'll do a show on it when I get some answers.
@@carlfranklin7894 Hi Carl, when is the video for IOs? sorry for the pressure, but there is not much information for IOS.
This video is exactly what I need for my project, but unfortunately I can't get the boot receiver working - it throws a Permission Denial exception at startup. I thought I must have missed something but it does the same running the code from github. Any ideas please?
Security exception: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.companyname.mauiandroidfs/crc642c2de4fd9814d752.MainActivity } from null (pid=20066, uid=2000) requires android.permission.RECEIVE_BOOT_COMPLETED
java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.companyname.mauiandroidfs/crc642c2de4fd9814d752.MainActivity } from null (pid=20066, uid=2000) requires android.permission.RECEIVE_BOOT_COMPLETED
same here and there is not much information about brocastreceiver to implement in maui
This is an excellent video, thank you!
Does it work on Android Emulator (Pixel 5 API34 Android 14)? I got it to work on my phone but not the emulator.
Same with me. it doesnt work on my emulator, same emulator as yours. what do you think could be the issue with it
That was an amazing tutorial. Thank you
Great video Carl, Can you share that code?
Links are in the show notes at thedotnetshow.com but here's the repo link: github.com/carlfranklin/mauiandroidfs
@@carlfranklin7894 The repository is set to private, please make it public.
@@marcoerlwein2165 Doh! Sorry. Public now
great Carl, thanks a lot, please for IOs
Working on it. iOS has an official process for notifications, so I'm first going to focus on background services, which have to continuously restart themselves to avoid being shut down by the OS.
@@carlfranklin7894 Thank you very much for the answer, you are a great person
Thanks Carl!
@@carlfranklin7894hello carl .. please is there any news about iOS 😐
Excellent presentation Carl, but please make the repository public.
Here's the link... github.com/carlfranklin/mauiandroidfs
@@DeveloperExpress Thank you Carl, but something wrong again with GitHub, error code 404 page not found.
@@cimishpk Fixed.
@@carlfranklin7894 Thank you
thank you Carl! you rock dude!
Amazing tutorial thank you so much .. can please the same tutorial for Maui Blazor IOS ? .. waiting for it please
Would have been nice if there actually was something about a background service. I'm aware of the distinction and was actually looking for background service information, not foreground...
you can extend the foreground service by implementing Android.Content.BroadcastReceiver that receives SCREEN_OFF event and when it does acquire Android.OS.PowerManager.WakeLock with WakeLockFlags.Partial. then it will run all the time.
Same, did you found any way to do it?
@lukasjacobs2358 it's called background service on computers and foreground service on mobiles/handheld device