Get video thumbnail from url of video

Here are two methods to retrieve thumbnail from a video. 1. Using MediaMetadataRetriever Works for local files and most URLs Usage 2. Using Glide (simpler, recommended for network URLs) Add this dependency Then use below code. Glide automatically extracts a representative frame from the video and displays it in the ImageView. MediaMetadataRetriever might fail for … Read more

Encrypt and decrypt text

This post is about creating an android app to encrypt and decrypt text. Step 1: Create a new project with name Encryption. Step 2: Open res/layout/xml (or) main.xml and add following code. Here we add an EditText, two Buttons, and two TextViews. Step 3: Open app/src/main/java/package and open MainActivity.java. Add following code in it. Output:Now run the … Read more

GridView with Image and Text

This tutorial shows how to display a Map List containing texts and images in a Custom GridView. Step 1: Create a new project with name GridViewExample and package name com.myexample.gridview. Select File/New/New Project. Fill the forms and click “Finish” button. Step 2: Open res/layout/xml (or) main.xml and add following code. Here we add a GridView. Step … Read more

GridView Example

This tutorial shows how to display a String list in a GridView. Step 1: Create a new project with name GridView and package name com.myexample.gridview. Select File/New/New Project. Fill the forms and click “Finish” button. Step 2: Open res/layout/xml (or) main.xml and add following code. Here we add a GridView mainGridView1. Step 3: Open app/src/main/java/package and open … Read more

Expandable ListView Example

This tutorial shows how to display a HashMap with String and ArrayList<String> as key value pairs, in an ExpandableListView. Step 1: Create a new project with name ExpandableListView and package name com.myexample.listview. Select File/New/New Project. Fill the forms and click “Finish” button. Step 2: Open res/layout/xml (or) main.xml and add following code. Here we add an … Read more

Custom ListView with BaseAdapter for displaying Map List

This tutorial shows how to display a Map List containing text and images in a Custom ListView. Step 1: Create a new project with name ListViewExample and package name com.myexample.listview. Select File/New/New Project. Fill the forms and click “Finish” button. Step 2: Open res/layout/xml (or) main.xml and add following code. Here we add a ListView mainListview1. … Read more