voxel Active Member Licensed User May 3, 2024 #1 Hello, I would like to make notifications without using Firebase. I couldn't find it on the forum. Thanks for your help.
Hello, I would like to make notifications without using Firebase. I couldn't find it on the forum. Thanks for your help.
Alexander Stolte Expert Licensed User Longtime User May 4, 2024 #2 And what kind of notifications? Local notifications or sent from a server? Upvote 0
Alexander Stolte Expert Licensed User Longtime User May 4, 2024 #3 B4X Push Server B4X Push Server is a B4J written back-end server for B4i and B4A apps that use push notifications (Android - GCM, iOS - APN). Its two main features are: - Collect device tokens - DeviceToken class. - Send messages to the devices - Send servlet (which calls iOSPush and AndroidPush modules)... www.b4x.com But Firebase seems to be the only way forward in B4I 2024. Upvote 0
B4X Push Server B4X Push Server is a B4J written back-end server for B4i and B4A apps that use push notifications (Android - GCM, iOS - APN). Its two main features are: - Collect device tokens - DeviceToken class. - Send messages to the devices - Send servlet (which calls iOSPush and AndroidPush modules)... www.b4x.com But Firebase seems to be the only way forward in B4I 2024.
voxel Active Member Licensed User May 4, 2024 #4 Hello, I would like to trigger a notification when querying my server (downloading a file in https) Upvote 0
Erel B4X founder Staff member Licensed User Longtime User May 5, 2024 #5 voxel said: Hello, I would like to trigger a notification when querying my server (downloading a file in https) Click to expand... The best you can do is to implement a "background fetch" feature and show a local notification. You will not have real control over the timing of the notifications. Upvote 0
voxel said: Hello, I would like to trigger a notification when querying my server (downloading a file in https) Click to expand... The best you can do is to implement a "background fetch" feature and show a local notification. You will not have real control over the timing of the notifications.
voxel Active Member Licensed User May 5, 2024 #6 Do you have a code example for using a local notification? and an example of background fetch? Can I use this example? https://www.b4x.com/android/forum/threads/background-fetch-downloads.56022/page-2 Can I trigger a task in the background every day at 12 p.m. and then trigger a local notification? Why won't I be able to control the start time of notifications? Thank Upvote 0
Do you have a code example for using a local notification? and an example of background fetch? Can I use this example? https://www.b4x.com/android/forum/threads/background-fetch-downloads.56022/page-2 Can I trigger a task in the background every day at 12 p.m. and then trigger a local notification? Why won't I be able to control the start time of notifications? Thank
Alexander Stolte Expert Licensed User Longtime User May 5, 2024 #7 voxel said: Can I trigger a task in the background every day at 12 p.m. Click to expand... Nope... Half a year ago I tried to develop an alarm clock with B4I, but the app was always killed by the OS without having an extended time. Does not work: How to use the BGTaskScheduler I would like to create an alarm clock app and have found apps in the app store that do exactly what I want to achieve. e.g. ring in 8 hours, the apps regulate the volume in the background of the music that is then played -> so the app has to run in the background. I came across the following... www.b4x.com How to use the BGProcessingTask How can i use the BGProcessingTask with B4I? https://developer.apple.com/documentation/uikit/app_and_environment/scenes/preparing_your_ui_to_run_in_the_background/using_background_tasks_to_update_your_app?language=objc... www.b4x.com How to use BGProcessingTaskRequest How can i use this in B4I? https://developer.apple.com/documentation/backgroundtasks/bgprocessingtaskrequest?language=objc Thanks Alex www.b4x.com voxel said: every day at 12 p.m. and then trigger a local notification? Click to expand... You can schedule a notification every day at 12pm: UserNotificationCenter class - Schedule Notifications https://www.b4x.com/android/forum/threads/usernotificationcenter-class.117925/#content This is an addition to the UserNotificationCenter class. https://developer.apple.com/documentation/usernotifications/scheduling_a_notification_locally_from_your_app?language=objc Sub Class_Globals... www.b4x.com Upvote 0
voxel said: Can I trigger a task in the background every day at 12 p.m. Click to expand... Nope... Half a year ago I tried to develop an alarm clock with B4I, but the app was always killed by the OS without having an extended time. Does not work: How to use the BGTaskScheduler I would like to create an alarm clock app and have found apps in the app store that do exactly what I want to achieve. e.g. ring in 8 hours, the apps regulate the volume in the background of the music that is then played -> so the app has to run in the background. I came across the following... www.b4x.com How to use the BGProcessingTask How can i use the BGProcessingTask with B4I? https://developer.apple.com/documentation/uikit/app_and_environment/scenes/preparing_your_ui_to_run_in_the_background/using_background_tasks_to_update_your_app?language=objc... www.b4x.com How to use BGProcessingTaskRequest How can i use this in B4I? https://developer.apple.com/documentation/backgroundtasks/bgprocessingtaskrequest?language=objc Thanks Alex www.b4x.com voxel said: every day at 12 p.m. and then trigger a local notification? Click to expand... You can schedule a notification every day at 12pm: UserNotificationCenter class - Schedule Notifications https://www.b4x.com/android/forum/threads/usernotificationcenter-class.117925/#content This is an addition to the UserNotificationCenter class. https://developer.apple.com/documentation/usernotifications/scheduling_a_notification_locally_from_your_app?language=objc Sub Class_Globals... www.b4x.com
Erel B4X founder Staff member Licensed User Longtime User May 5, 2024 #8 Alexander Stolte said: Half a year ago I tried to develop an alarm clock with B4I, but the app was always killed by the OS without having an extended time Click to expand... This should be done with a scheduled local notification. There is no other way. voxel said: Why won't I be able to control the start time of notifications? Click to expand... With background fetch the OS will start the process from time to time. You have no control over the exact time. Note that background fetch actually starts your app. Local notification doesn't. Upvote 0
Alexander Stolte said: Half a year ago I tried to develop an alarm clock with B4I, but the app was always killed by the OS without having an extended time Click to expand... This should be done with a scheduled local notification. There is no other way. voxel said: Why won't I be able to control the start time of notifications? Click to expand... With background fetch the OS will start the process from time to time. You have no control over the exact time. Note that background fetch actually starts your app. Local notification doesn't.
voxel Active Member Licensed User May 5, 2024 #9 Erel said: Note that background fetch actually starts your app. Local notification doesn't. Click to expand... I don't understand :-( If I use this code, I won't be able to display a notification if the application is in the background? Background Fetch (Downloads) Background fetch feature allows applications to run for a short period of time (up to 30 seconds) while in the background. The steps required to use this service are: 1. Add the fetch mode declaration: #PlistExtra: UIBackgroundModesfetch 2. Download the attached zip file and copy main.m to... www.b4x.com Upvote 0
Erel said: Note that background fetch actually starts your app. Local notification doesn't. Click to expand... I don't understand :-( If I use this code, I won't be able to display a notification if the application is in the background? Background Fetch (Downloads) Background fetch feature allows applications to run for a short period of time (up to 30 seconds) while in the background. The steps required to use this service are: 1. Add the fetch mode declaration: #PlistExtra: UIBackgroundModesfetch 2. Download the attached zip file and copy main.m to... www.b4x.com
Erel B4X founder Staff member Licensed User Longtime User May 5, 2024 #10 You will be able to show a notification. Upvote 0
Alexander Stolte Expert Licensed User Longtime User May 5, 2024 #11 Erel said: This should be done with a scheduled local notification. There is no other way. Click to expand... Then the other apps in the App Store must work their magic, because they can even change the volume while the music is playing and play the notification sound even though the phone is in silent mode and all while the app is in the background. Wakey - Challenge Alarm Clock App - App Store Download Wakey - Challenge Alarm Clock by Konrad Galczynski on the App Store. See screenshots, ratings and reviews, user tips, and more apps like Wakey -… apps.apple.com Upvote 0
Erel said: This should be done with a scheduled local notification. There is no other way. Click to expand... Then the other apps in the App Store must work their magic, because they can even change the volume while the music is playing and play the notification sound even though the phone is in silent mode and all while the app is in the background. Wakey - Challenge Alarm Clock App - App Store Download Wakey - Challenge Alarm Clock by Konrad Galczynski on the App Store. See screenshots, ratings and reviews, user tips, and more apps like Wakey -… apps.apple.com
voxel Active Member Licensed User May 6, 2024 #12 I am using a B4X project (Main & B4XMainPage), is it possible to put the code for the Application_FetchDownload function in the B4XMainPage class? (see last example in the link) Background Fetch (Downloads) Background fetch feature allows applications to run for a short period of time (up to 30 seconds) while in the background. The steps required to use this service are: 1. Add the fetch mode declaration: #PlistExtra: UIBackgroundModesfetch 2. Download the attached zip file and copy main.m to... www.b4x.com Thank you for your help Upvote 0
I am using a B4X project (Main & B4XMainPage), is it possible to put the code for the Application_FetchDownload function in the B4XMainPage class? (see last example in the link) Background Fetch (Downloads) Background fetch feature allows applications to run for a short period of time (up to 30 seconds) while in the background. The steps required to use this service are: 1. Add the fetch mode declaration: #PlistExtra: UIBackgroundModesfetch 2. Download the attached zip file and copy main.m to... www.b4x.com Thank you for your help
Alexander Stolte Expert Licensed User Longtime User May 6, 2024 #13 That's a new question, you should start a new thread Upvote 0