Hello. I have a native iOS bubble app (I used BDK) that has a real-time chat messaging feature in it, too.
If i use the app in we browser, the chat is instant. When I use the chat in the native app (which is the default way my users), i need to close the app and open it again to see the latest messages (i’m using repeating groups, not external APIs or databases).
Any idea how/if I can solve this problem?
Hmmm… I don’t know much about native nor BDK, but if I were a betting man, I would bet that iOS / Android do some battery management to apps and turn off the feature that allows Bubble to keep a live connection to the database.
Maybe this could be an idea to investigate?
I also have a messaging feature in my app, so I know exactly what’s happening for you.
This is caused by a serious Bubble bug that they have ignored for years. Their elastic search functionality breaks on iOS mobile browsers whenever the window is closed. The bdk wrapper uses a frameless safari instance to display your app, so the same rules apply.
I have been able to work around this somewhat by adding a date search parameter to all searches that I need to keep updated. I have the app change the date for the parameter every time the user interacts with the app. This changes the search enough to force Bubble to reset and re-establish the connection to the server. See screenshot below.
You could also tie this to a refresh button or any other action in the app. Just keep in mind this does force the RG to complete reload content, so you don’t want to change the parameter unless necessary. Not a perfect solution, but better than having to reload the page every time you open the app.
Yeah this is a well-known bug, if it is a bug! Basically what happens is the device and the embedded browser in the app that’s wrapping bubble goes to sleep or becomes idle.
A refresh is your best option and simplest
Our app is a Google Voice clone, so asking users to refresh the app every time they check or response to a text message just isn’t an option.
It’s definitely due to battery-saving features that make the page idle, but it’s also clearly possible for Bubble to add features that force the connection to re-establish when the page is viewed again (since we’re able to force this on a search-by-search basis), without forcing a whole page to reload, but they haven’t prioritized this fix. I think most apps can afford to just have users refresh the page, so it’s only an issue for apps like mine or @sina who need to meet user expectations messaging apps not having to refresh every time they are used.
I think this option can be customized if you are on a dedicated server. Doesn’t hurt to also reach out to support
That’s good to know about, I will ask.
This looks very interesting, thanks for sharing. Gonna try it out and share if it solves the problem
Pretty interesting workaround. Gonna try it out. Are you generally happy with the latency?
ooo. Just pinged them to check if they offer that customisation. thanks for sharing
It’s been a pretty solid short-term solution. No complaints with users and I use the app daily as well and I like the result.
Regardless, we’re planning to rebuild our app with react native though. We were never able to get our Bubble + BDK app to be as fast and smooth as we feel it needs to be for our VOIP/Messenger use case. We also need VOIP access through the iOS and Andoid call handling functions and I haven’t found any wrapper willing to invest in building that functionality and a custom wrapper costs nearly the same as a react native app would.
Yea my app is also a group audio + text chat so page refresh isn’t an option.
The other issue I’m facing (which i have a dedicated post for here) that might be related to battery-saving features too is background audio/mic stopping to work when user’s phone goes to sleep or when user leaves the app to go to another app (doesn’t happen when i open the app in browser but happens in the native app).
If you have any thoughts on that, i’d love to hear your thoughts in the other thread.
Oh cool, that makes sense. i’m hoping to push thru Q4 with my Bubble setup and start building in Q1 but let’s see how far i can go (building this)
I built a custom plugin with Jasonelle for the audio device. You can ask the Telegram JAsonelle forum and maybe solve your problem for a small fee.
You have full control with Jasonelle. The refresh is not necessary in my opinion. It’s easy to build the application to take a non-destructive break and come back to your application and especially prevent the application from going to sleep to save batteries.
2022 - 10 min. to build a free native iOS/Android app
I asked that group a while back, and everyone agreed that this is a feature of Safari/iOS and not in control of the app itself. I would love to be proven wrong though. Do you have an example of an app that was built this way?
@gaurav is this possible?