How to send Native Notifications on Android and iOS in Unity

  Рет қаралды 7,378

blazeDev

blazeDev

Күн бұрын

Пікірлер: 39
@J3FFBezos
@J3FFBezos Ай бұрын
Thanks, clear tutorial!
@Kutinski
@Kutinski 22 күн бұрын
14:28 Oglądałem ten tutorial i tak coś czułem ten polski akcent xD Ale dobra robota z tym filmem :D
@blazeDev_vlog
@blazeDev_vlog 22 күн бұрын
Ah, akcentu nie oszukasz 😅
@톰-l2o
@톰-l2o 10 ай бұрын
Hi. I saw your fantastic tutorials. Vibration video, Notification video. Thanks of lot! :)
@juanortiz5190
@juanortiz5190 3 ай бұрын
Great tutorial! Would it be possible to add a click event for when the user taps the notification while the app is in the foreground?
@JotalenG
@JotalenG 4 ай бұрын
Thanks for the video, it really helped me, but I have a question. In 4:35, will it work if I change the line 34 for a variable type DateTime with the date and hour that I want to send the notification? And, if it would work, How?😅 Thanks again.😄😄
@khaa5zz81
@khaa5zz81 Жыл бұрын
i think your code is outdated. the documentaion show us how to request permission it it uses "var request = new PermissionRequest();" now Permession class
@brij3044
@brij3044 Жыл бұрын
Fantastic tutorial, thank you!
@JonathanVeit-wf9jy
@JonathanVeit-wf9jy 8 ай бұрын
Amazing, thank you!
@HOCIJIKA
@HOCIJIKA Жыл бұрын
Great tutorial! Thanks 😊
@stefanciobotaru9678
@stefanciobotaru9678 7 ай бұрын
Nice tutorial. With the code as it is provided by you, every time the user opens the app, a new notification is scheduled. And also the nice badge is not shown. I liked your architecture, btw. i used to have one file and the code was a bit messy...
@samourai23
@samourai23 Жыл бұрын
Thanks for the tutorial
@aidenskeels
@aidenskeels Жыл бұрын
Bro, thank you. I was about to give up implementing the IOS one as I kept getting the errors and didn't know how to fix them without your help
@blazeDev_vlog
@blazeDev_vlog Жыл бұрын
Happy to hear that! 💪
@TshellAnimations
@TshellAnimations Жыл бұрын
brother thanks . i want to make unity sound running while the screen is of or locked
@mayurrathod5873
@mayurrathod5873 Жыл бұрын
Great tutorial Mate!!! But, I have problem with iOS notification. Notification gets displayed when video ad is being played. I just want to display notifications when app is minimized or when app is closed. Any fix for this?
@blazeDev_vlog
@blazeDev_vlog Жыл бұрын
Thanks! Notifications are scheduled using iOS API so you need to handle when app launch and cancel all notifications and then set them again when app closes. There is no way to check if app is running when displaying notification sadly.
@AnyaT-p2u
@AnyaT-p2u 11 ай бұрын
is there any way to set conditions for notifications? I want to access functions from other files in the program and send notifications based on the return value, and also if theres a way to get an apis response and send a notification based on that?
@blazeDev_vlog
@blazeDev_vlog 11 ай бұрын
You need to know content of the notification when you schedule it. If its content changes after you schedule it you should remove previous schedule and set it again - however application need to be opened then. For any other cases you will probably need to use cloud based notification, I have a plan to create tutorial about it in the future 🙂
@blazeDev_vlog
@blazeDev_vlog 11 ай бұрын
But generally content doesn’t have to be static, it can be dynamic. Just take values and put them in to content (if you know the content when scheduling).
@namxitrum2942
@namxitrum2942 6 ай бұрын
How to send notification when user doesn't open the app?
@blazeDev_vlog
@blazeDev_vlog 6 ай бұрын
You need to somehow schedule the notification. If you want to send notifications without this you need to use Firebase Cloud Messaging.
@Harshbadala127
@Harshbadala127 7 ай бұрын
Bro it's work in my android api 33. I have to do on notification form app settings then its work but i want that notification popup show and user all and automatically on notification permission
@blazeDev_vlog
@blazeDev_vlog 7 ай бұрын
Try combine with: if (!Permission.HasUserAuthorizedPermission("android.permission.POST_NOTIFICATIONS")) { Permission.RequestUserPermission("android.permission.POST_NOTIFICATIONS"); } somewhere at the beginning of your app loading logic
@Asif-ze5hp
@Asif-ze5hp Жыл бұрын
Great
@TerafortLimited
@TerafortLimited Жыл бұрын
make a tutorial for Firebase cloud messaging, and how to implement permissions for showing notifications for IOS , there are no tutorials at all
@blazeDev_vlog
@blazeDev_vlog Жыл бұрын
Noted on my todo list, I will take a look at this. Thanks!
@carrrwoman
@carrrwoman Жыл бұрын
Great tutorial but, this is not working when the app is close, isn't it?
@blazeDev_vlog
@blazeDev_vlog Жыл бұрын
It is! When you set up notification to push eg. in 5 minutes it will be shown to user in 5 minutes even if the app is closed.
@carrrwoman
@carrrwoman Жыл бұрын
@@blazeDev_vlog but not if it is force closed, maybe I miss some configuration?
@blazeDev_vlog
@blazeDev_vlog Жыл бұрын
Hm, maybe force closing cause that system request is not proceed successfully. I’m not sure. Maybe it’s somehow system-dependent. I’m not sure if there is an option to avoid it. There is also second type of notifications, those one pushed from the server, but this is much more complicated than calling system API.
@MeetSondagar-p7g
@MeetSondagar-p7g 9 ай бұрын
Bro Show me error: Severity Code Description Project File Line Suppression State Error CS0246 The type or namespace name 'AndroidNotificationChannel' could not be found (are you missing a using directive or an assembly reference?) Assembly-CSharp, Assembly-CSharp.Player C:\Users\DREAMWORLD\Work From Home Task\Assets\Scripts\AndroidNotificationsController.cs 20 Active Error CS0246 The type or namespace name 'AndroidNotification' could not be found (are you missing a using directive or an assembly reference?) Assembly-CSharp, Assembly-CSharp.Player C:\Users\DREAMWORLD\Work From Home Task\Assets\Scripts\AndroidNotificationsController.cs 32 Active Error CS0103 The name 'NotificationManager' does not exist in the current context Assembly-CSharp, Assembly-CSharp.Player C:\Users\DREAMWORLD\Work From Home Task\Assets\Scripts\AndroidNotificationsController.cs 27 Active Error CS0103 The name 'NotificationManager' does not exist in the current context Assembly-CSharp, Assembly-CSharp.Player C:\Users\DREAMWORLD\Work From Home Task\Assets\Scripts\AndroidNotificationsController.cs 37 Active Error CS0103 The name 'NotificationImportance' does not exist in the current context Assembly-CSharp, Assembly-CSharp.Player C:\Users\DREAMWORLD\Work From Home Task\Assets\Scripts\AndroidNotificationsController.cs 24 Active
@blazeDev_vlog
@blazeDev_vlog 9 ай бұрын
It seems like you using Assembly Defines in your project. Because of that, reference will not be found automatically. You need to find Assembly Define you use with this script inside your project and manually add Unity.Notifications.Android (or Unity.Notifications.iOS for iOS) to the "Assembly Definition References" list.
@littledemo3605
@littledemo3605 Жыл бұрын
!permission.HasUserAuthorizePermission("text") what that means?
@blazeDev_vlog
@blazeDev_vlog Жыл бұрын
Hi! To send notification on newer Android versions (I'm not sure, but starting from Android 13 probably) you need to ask for permission to do that. This is what Permission.RequestUserPermission do. But when user respond for this permission (no matter if they agree or reject) we don't want to ask them anymore for this permission. Without this if statement the user would be asked for this permission on every game launching. 😅
@blazeDev_vlog
@blazeDev_vlog Жыл бұрын
And the "text" is just the name of permission we want to ask for. In this case we ask for notification permission so we need to use "android.permission.POST_NOTIFICATIONS". Other permissions are listed in Android documentation.
@littledemo3605
@littledemo3605 Жыл бұрын
why i love unreal more than unity?@@blazeDev_vlog
How to vibrate and haptic on Android and iOS in Unity
7:45
blazeDev
Рет қаралды 10 М.
Unity PUSH NOTIFICATION Tutorial: iOS and ANDROID + Icons
18:24
Rigor Mortis Tortoise
Рет қаралды 6 М.
бабл ти гель для душа // Eva mash
01:00
EVA mash
Рет қаралды 8 МЛН
風船をキャッチしろ!🎈 Balloon catch Challenges
00:57
はじめしゃちょー(hajime)
Рет қаралды 51 МЛН
Каха и лужа  #непосредственнокаха
00:15
How To Make Your Game Look The Same On All Mobile Screen Sizes - Unity Mobile Game Development
7:50
Awesome Tuts - Anyone Can Learn To Make Games
Рет қаралды 159 М.
Codeless In-App Purchases 2021 | Unity Tutorial
21:57
Jake McNeal
Рет қаралды 38 М.
How to : Integrate Google Play login into your Unity project
25:13
#s24ultra _vs_ #iphone16promax #iphone16promax #s24ultra #foryou
0:58
Connect Mobile
Рет қаралды 20 МЛН
А зачем ему рабочий ноутбук?..
0:12
Новостной Гусь
Рет қаралды 648 М.
Rate ⭐ This Nokia Hole Phone with...
0:14
Shakeuptech
Рет қаралды 1,6 МЛН
Новый планшет Карины😍
0:45
Карина Ням-Нями
Рет қаралды 1,4 МЛН