NIOSH recently released a free app (iOS only) to measure sound pressure levels and calculate dose levels.

Here's the link to the page describing the app, with supporting information.

It is iOS only, as Apple controls all aspects of the iPhone hardware. Android phones apparently have too much variation in the parts used (mic, DSP) for them to feel the app would be successful. The app can also use an external microphone for even more precise measurements.

I've used several other iOS apps to measure dB levels when I thought I was being exposed to too much sound--at concerts, restaurants, live performances, airports. Many of them perform well and give useful information; all cost several dollars. This one is free, comes with backing from NIOSH, and has a good bit of educational material.

The NIOSH Science Blog entry for January 2017 discusses the development of the app, as well as testing other SPL measurement apps for iOS and Android.

Note: I have no audiology training; posting this only as someone with hearing loss who is interested in detecting environments where I need protection against further degradation.