Register a callback function that handles requests from the foreground.
The callback function for handling the request.
A Promise that resolves to true if the request was handled successfully, and false otherwise.
Register a callback function that handles requests from the foreground.