15 days Cordova Android Trial app

Hi,

I am building 2 versions of my Android app, one a trial version with full functionalities which expires after 15 days,
I have a webserver with database, so i was planning to save the Unique ID using this plugin
UniqueDeviceID along with the date.

At the end of trial period, show user the link to Play store for the Pro version. Would this approach work ? Would there be a situation where this plugin can return null values or duplicate values ?

I am using Cordova version 6.4.

Thanks !