Most apps like that inject a proxy to all your data calls. Through that they measure the amount of bandwidth you are consuming.
There is no way to measure data you are using outside of your app. You can track it for your own network call within your app though.