Implemented a conditional check to allow for the duration to be provided on the Android platform for SDK 8 and above.