Thanks Ashish. These samples/tutorials are a great idea. I'm sure many (including myself) will find value in them.
One question that applies these sample apps:
In the function
What's the purpose of setting up edge detection on the LED gpio output pin?
// set call back for change in state of GPIO
The change event handler is added to the push button or gpio input pin when the component is initialised.