The player “chooses when” - there is no “announce”
From the “Your Turn” section of Chapter 9 of D&D Basic Rules.
You choose when to take a bonus action during your turn, unless the bonus action’s timing is specified
Players have the leeway on what to do during their turn, and when
Although these quotes don’t mention bonus actions specifically, they demonstrate a players canplayer generally has unfettered leeway over what to do on his character’s turns.
You decide whether you move first or take your action first.
You can break up your movement on your turn, using some of your speed before and after your action. For example, if you have a speed of 30 feet, you can move 10 feet, take your action, and then move 20 feet.
The parts of your turn are resolved as you perform them. There are no general conditions that restrict what the player chooses to do. In the above example, the additional 20 feet of movement after the action is resolved. (For example, if an attack drops an opponent, the player can choose to advance further.)
The same is true for bonus actions. A player may elect to use a bonus action, if she has one available, at any point in her turn. She can make this election based on what has happened during her turn.