Consider posting your project, makes life easier to troubleshoot.
In real time means on actual advertisement, right?
If that is the case, try using the API 'CyBle_GapUpdateAdvData' after every data change.
How are you measuring battery voltage? It would be good to have this type of functionality baked into a drop in component. At the moment it's not clear how to achieve this without adding external components.
A simple once per day BAT check to indicate if the coin cell is OK or LOW will do. If LOW I can mod the advertising packet so an observing smartphone can take action. In my particular application measurements don't need to be high accuracy or frequency but they do need to be low power and I'd prefer not to add any external components.
Riot is correct, updating the advertisement is fairly straight forward using CyBle_GapUpdateAdvData. You can actually do a whole host of things with this. Have a look at the 100 Days Project 9 Dynamic Broadcasting.
Thank you all for the comments,
@Paul: I am using the onboard ADC and the battery measuring sample code provided in Project 045 the Optical Heart rate Monitor.
I am using the same code but it always gives 100%. I did not suspect anything until the battery suddenly died. It seems that there should be some time between 100% and when the battery died (which the code cannot measure). Now I am questioning its accuracy. Have you done any test to determine how accurate it is?