Add upload functionality to the sample.

Its a bit strange that we are adding an extension only in case the platform is android.