I have been brainstorming push notification and how I plan to integrate them and I thought this may be a good option for Bubble’s push into native apps:
So personally, assuming the native development is still in beta - I am thinking of getting my Bubble app file - manually adding code for push notifications (likely will ask someone else to help me ) - using Bubbles API - then doing it through Phonegap.
The feature idea is this though - triggering an API call via the conditional section of the Bubble editor:
I would love it if I could do something like this:
**Conditional example:** When - Do a search for: current users messages Creation date:first item > (custom data field)'s creation date = this element is visible.
(the element would be like a #1 or “New” to mean new notification)
Then a second condition: When - this element is visible = [via dropdown] Trigger [api] Do a search for… Notification 2
Notification 2 could be a text - possibly an image as well in the data base that will fill the native push notifications template.
I think push notifs have images?? Well either way - thats aside the point (I dont get any notifs on my phone… (the irony))
Anyway something like that. I don’t really know exactly how it would work but i think that would be cool if it could be done.
You can link the first search and condition directly to a workflow as a condition on the event.
There are two important notions here: app data and state data. App data is what you store permanently - a user’s age, the number of items they own etc.
State data is temporary, just for the duration of the user’s actions, in order to keep track of whether they are editing this field or another, and keep intermediate information. For example, if they are editing a SQL query, you want to edit the query until it is correct (state data), and only save it once it’s tested.
If you want to save a checkbox’s state you can always do so by reading it in a workflow.
You might enjoy this article on designing and building UI - feel free to ignore the code - understanding the technology is sufficient and very helpful in understanding how to model UI.
I didn’t grasp the concept 100% when i first read it, but i recently pulled off a pretty satisfying sequence storing temporary data in an obscure front-end element.
(only with Bubble could that process have been so enjoyable)
This isn’t urgent at all; but I am curious to know what your think about this: (Regarding the React link you sent)
(My initial post was a bad example; here is a simplified question):
Since the data: Current User is implied with app usage; and easily retrievable.
Can I request it as needed without setting a parent groups data source to current user, without compromising the codes “linear” structure?
OR, is it better practice to set a parent groups data source to Current user then call for “Parent Groups User” as needed, in any sub groups down the hierarchy?
I’d like to use text notifications, like when using Facebook on Chrome, so it will display a little window of new posts, shares, comments etc. For some chat or calendar based apps push notification is key. I think an action like “send email” would be fine.
Installations options are SDK (uses an user key and 3 files on root of domain) or Server API.
Could you not just add push notification script from a third-party to the page? See https://pusher.com/tutorials/realtime-notifications for an example. From what I can tell the script elements could be added to the header and body. If I am wrong, please let me know as HTML5 push notification is important.
Hey guys, I got some ideas, FYI I`ve been dormant for a period due to lots of work and wasnt using bubble for anything yet but I love the concept and seeing how it matures with more users requesting features like this.
So to implement push notifications as I see it we need:
Able to inject some cordova push plugin into your bubble app. Im not sure if @emmanuel is very happy that we extract the HTML+CSS+cordova plugins from the IPA/APK but I see this as necessary if we dont receive the precompiled project files themselves. Is there any other native code. After modifying you can re-sign it (I assume), see my #ref in footer of this post for more info.
Ability to call the cordova plugin to request allowance of push notifications and receive the device identifier through JS, then post this to our server (save to current user profile data (deviceId=xxxxxxx).
to be able to send a push request via a PUSH provider. Then we send to the push providers API with either single device id or multiple device ID`s. (You can test this feature alone getting the pusher app and sending push request to their REST api from your bubble app. https://pushover.net/api)
To handle incoming push notifications on opening the notification. By default app would open at default view. You can use custom plugins or modifications of push plugins to listen for a custom payload that the push message contains. Here you could either go to the correct view or call a custom JS function that opens the correct view /overlay / modal.