How to get installed app version

Hey there, I am using ionic 3 for my android application. I want to display update app popup to user every time I update application on play store. I have tried to get app version in my application, but it throws me error i.e.

vendor.js:1775 ERROR Error: Uncaught (in promise): TypeError: Object(…) is not a function
TypeError: Object(…) is not a function
at AppVersion.getAppName (vendor.js:89626)
at HomePage.webpackJsonp.349.HomePage.getAppVersion (main.js:1951)
at SafeSubscriber._next (main.js:1947)
at SafeSubscriber.__tryOrSetError (vendor.js:20860)
at SafeSubscriber.next (vendor.js:20800)
at Subscriber._next (vendor.js:20738)
at Subscriber.next (vendor.js:20702)
at BehaviorSubject._subscribe (vendor.js:81393)
at BehaviorSubject.Observable._trySubscribe (vendor.js:19843)
at BehaviorSubject.Subject._trySubscribe (vendor.js:23679)
at c (polyfills.js:3)
at c (polyfills.js:3)
at polyfills.js:3
at t.invokeTask (polyfills.js:3)
at Object.onInvokeTask (vendor.js:5077)
at t.invokeTask (polyfills.js:3)
at r.runTask (polyfills.js:3)
at o (polyfills.js:3)
at e.invokeTask (polyfills.js:3)
at i.isUsingGlobalCallback.invoke (polyfills.js:3)

I have installed cordova app version and native app version plugin. But still got same error. Please help.