100% possible and very easy
Just look at the app I made a long time ago and feel free to copy the code to get started: