Failure to remove alarm!

hello my friend is trying to create an alarm, and it works, however I encountered a problem when wanting to remove it is there any suggestion? thank you


the minimum API Level to cancel an alarm is API Level 24 (Android 7), see also Q3 here App Inventor Extensions: Alarm | Pura Vida Apps



As Taifun said, this is not possible to do in old android versions.
Check the version of the device and execute it only if it is >23