Display video thumbnails in firebase chat
To upload and display video thumbnail in a firebase based chat in Sketchware, follow the steps given below. 1. On the chat page add a file picker to pick files (mime type */*). 2. Add an ImageView imageview1 for picking files. 3. In imageview1 onClick event use file picker to pick files. 4. Create a String variable path . 5. In file picker onFilesPicked event, set String path to the path of the file selected. 6. In the event of button1 onClick (send button), if String path is not empty, upload the file to Firebase storage. 7. Add a String variable thumb_String . 8. In the event Firebase storage onUpload success , if the file selected is a video, create thumbnail from the path , convert it to base64 String, and send the url of the video (using key "attachment") and the thumbnail in String form (using key "thumbnail") to firebaseDb. The code used here is: Bitmap bitmap =ThumbnailUtils.createVideoThumbnail(path, android.provider.MediaS