An android asynchronous preview of a webpage from its link.

Overview

Description

An android asynchronous preview of a webpage from its link.

Versions

Getting Started (V1.0.0)

Add the dependency in build.gradle (App module)

compile 'com.eukaprotech.linkpreview:linkpreview:1.0.0@aar'

Add permission in manifest file

<uses-permission android:name="android.permission.INTERNET" />

Usage (V1.0.0)

    LinkPreview linkPreview = new LinkPreview(context);
    String link = "the web page complete link";
    linkPreview.preview(link, new LinkPreviewHandler() {

        @Override
        public void onStart() {
            
        }

        @Override
        public void onGetLinkRedirectedTo(String link_redirected_to) {
            
        }

        @Override
        public void onGetTitle(String title) {
            
        }

        @Override
        public void onGetDescription(String description) {
            
        }

        @Override
        public void onGetFavicon(String faviconLink) {
            
        }

        @Override
        public void onGetImageLink(String imageLink) {
            
        }

        @Override
        public void onFail(String response, String error) {
            
        }


        @Override
        public void onComplete() {
            
        }
    });

By default, the necessary preview content of the web page is stored to cache for faster later retrieval.

To skip reading from cache:

   linkPreview.skipReadFromCache(true);

To skip storing to cache:

   linkPreview.skipStoreToCache(true);

The below sample will avoid reading the contents of the previewed webpage from cache:

    LinkPreview linkPreview = new LinkPreview(context);
    String link = "the web page complete link";
    linkPreview.skipReadFromCache(true).preview(link, new LinkPreviewHandler() {

        @Override
        public void onStart() {
            
        }

        @Override
        public void onGetLinkRedirectedTo(String link_redirected_to) {
            
        }

        @Override
        public void onGetTitle(String title) {
            
        }

        @Override
        public void onGetDescription(String description) {
            
        }

        @Override
        public void onGetFavicon(String faviconLink) {
            
        }

        @Override
        public void onGetImageLink(String imageLink) {
            
        }

        @Override
        public void onFail(String response, String error) {
            
        }


        @Override
        public void onComplete() {
            
        }
    });

The entire cache, for all previewed web pages, is cleared with time.

To force the clearing of cache, use the static method:

   LinkPreview.clearCache(context);

Download

You might also like...
Fast android task that finished in only 3 hours, it gets the information from national number without database. I just wanna refine my skills in android basics so I try to make this simple project.
Fast android task that finished in only 3 hours, it gets the information from national number without database. I just wanna refine my skills in android basics so I try to make this simple project.

RaqmQawmy it is a fast android task that finished in only 3 hours, it gets the information from national number without database. I just wanna refine

A LibrePhotos android client written using Jetpack Compose and all the latest Android technologies
A LibrePhotos android client written using Jetpack Compose and all the latest Android technologies

UhuruPhotos. A LibrePhotos client UhuruPhotos is an Android client for LibrePhotos written using the latest Android technologies, like Jetpack Compose

🎺 Orchestra is a collection of Android custom view compatible libraries for Jetpack Compose.
🎺 Orchestra is a collection of Android custom view compatible libraries for Jetpack Compose.

Orchestra 🎺 Jetpack Compose compatible libraries using Balloon, ColorPickerView, PowerSpinner. Balloon Add below codes to your root build.gradle file

Neumorphism UI on Android with Jetpack Compose.
Neumorphism UI on Android with Jetpack Compose.

Neumorphism UI with Jetpack Compose This library is an experimentation with Neumorphism UI (New + Skeuomorphism) on Android with Jetpack Compose. How

Lightweight library to tweak the fling behaviour in Android. This library is only compatible with Jetpack-Compose.
Lightweight library to tweak the fling behaviour in Android. This library is only compatible with Jetpack-Compose.

Flinger (Only compatible with compose) What is Flinger? Flinger is a plugin that is made on top of jetpack compose that will help the developer to twe

Jetpack Compose 版本的「玩 Android」
Jetpack Compose 版本的「玩 Android」

wanandroid-compose Jetpack Compose 版本的「玩 Android」 环境 AndroidStudio: Gradle: 7.0.0-beta02 Kotlin: 1.4.30 Compose: 1.0.0-beta07 功能 登录、注册 等级、排名、积分、收藏 首页、

A simple 'Slide to Unlock' Material widget for Android, written in Jetpack Compose
A simple 'Slide to Unlock' Material widget for Android, written in Jetpack Compose

SlideTodo A simple 'Slide to Unlock' Material widget for Android, written in Jetpack Compose you can find source code here Getting Started allprojects

A Sudoku game for Android & Desktop written with Jetpack Compose Multiplatform
A Sudoku game for Android & Desktop written with Jetpack Compose Multiplatform

🚀 Compose Arcade A sample Kotlin Multiplatform Compose Sudoku app for Android & Desktop. Most code is shared between Android & Desktop using Kotlin M

Android browser written by jetpack compose
Android browser written by jetpack compose

TS Browser Top secret Browser! Download Features ■ Secret Mode Secret mode is a unique mode in TS browser. The secret mode is designed for browsing se

Owner
David
Software Developer
David
unfurl extracts social metadata of webpages for generating link previews

unfurl unfurl extracts social metadata of webpages for generating link previews, inspired by slack. val unfurler = Unfurler() println(unfurler.unfurl(

Saket Narayan 230 Dec 24, 2022
Luis David Orellana 11 Jan 1, 2023
Learn Jetpack Compose for Android by Examples. Learn how to use Jetpack Compose for Android App Development. Android’s modern toolkit for building native UI.

Learn Jetpack Compose for Android by Examples. Learn how to use Jetpack Compose for Android App Development. Android’s modern toolkit for building native UI.

MindOrks 382 Jan 5, 2023
JetFlix - A clone of Android NetFlix app in Android built using Jetpack compose.

JetFlix A clone of Android NetFlix app in Android built using Jetpack compose. This sample app showcases the following: MVVM Architecture (ViewModel +

Pushpal Roy 40 Dec 6, 2022
Android Jetpack is a set of components, tools and guidance to make great Android apps.

Android Jetpack is a set of components, tools and guidance to make great Android apps. They bring together the existing Support Library and Architecture Components and arrange them into four categories.

Atik Faysal 0 Dec 8, 2021
🗺 Android Developer Roadmap 2022 suggests learning paths to understanding Android development.

Android Developer Roadmap 2022 English | 한국어 Android Developer Roadmap 2022 suggests learning paths to understanding Android development. You can read

Jaewoong Eum 5.2k Jan 8, 2023
Split Food Bill is an android application where user can split the expenses based on the number of people joined the trip. This application is developed using Android's Jetpack Compose

SplitFoodBill-Compose Split Food Bill is an android application where user can split the expenses based on the number of people joined the trip. This

Shivaprasad Bhat 1 Jan 17, 2022
Android.compose.squircle - Android LightWeight Squircle Library for JetPack Compose

Android LightWeight Squircle Library for JetPack Compose Usage Based on Compose

Quang Nguyen 9 Jul 5, 2022
Foldable-chat-android - Foldable chat Android demonstrates adaptive and responsive UIs with Jetpack WindowManager API

Foldable Chat Android A foldable chat Android demonstrates adaptive and responsi

Stream 31 Oct 29, 2022
Sunflower - A gardening app illustrating Android development best practices with Android Jetpack

Sunflower - A gardening app illustrating Android development best practices with Android Jetpack

Vinicius Amaral 1 Apr 17, 2022