Removing notifications off all programs while running my kodular app

welcome everyone
Firest I really want to thank everyone who has contributed to this wonderful community
I searched a lot in the community for a way for Removing notifications off all programs while running my kodular app but withot solution
but this is JAVA code which doing that and i hope if any Extantion developer make this extantion :

public class MainActivity extends AppCompatActivity {

private NotificationManager mNotificationManager;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
    mNotificationManager.cancelAll();
}

}