How to get the app version from both google play and appstore

Hi, I am using ionic3, I am wondering how to get the real time app version both in google play and app store, thanks.