Know which version of android is installed

Dear, good afternoon. I need to know the version of Android that is installed on the cell phone to make programming decisions based on this.
Someone could give me a hand with this.
Thank you

Richard

The proper way to do this is to check whether the feature you need is there, not the version of Android.

What are you trying to do?

I developed a Phonegap application, to scan documents through the cell phone camera and send them to a server. All good, but I notice that the photos that are taken from cell phones with new versions of Android (8 and higher), are generated in landscape and that forces me to transform it before sending. To not have to define in the user profile what type of cell phone you use, I need to know the version of Android that is installed on the cell phone used for the application and that way to adapt the image as I need it. Is there a function for this in NSBasic? How can i solve this problem? Thanks George and regards.

If you’re on PhoneGap, the best way is to use this plugin: