Device alert respond

Dear Team,
need your help I am making a project that will use Bluetooth to transmit data on every single notification.

can anyone help me? that how I can tell my app that my device receives any message or call?