The Android version of the plugin is very similar to the iOS version, although it doesn't have to worry about the version of PhoneGap in use, so it is a little shorter. Ultimately, though, the steps are the same: grab a frame from a video, save it to storage, and return to JavaScript.
First off, create a new class by opening the File menu, selecting New, and then selecting Class.
Next, set the Package to com.kerrishotts.PKVideoThumbnail
, the Name field of the class to PKVideoThumbnail
, and then uncheck the first item under Which method stubs would you like to create? – we won't need any sample code. This is shown in the following screenshot:
Next, open the
resulting file PKVideoThumbnail.java
file, and we'll start writing the Android version.