com.baha.url.preview

Help android developer easier to get url preview info

Лицензия

Лицензия

Группа

Группа

tw.com.oneup.www
Идентификатор

Идентификатор

com.baha.url.preview
Последняя версия

Последняя версия

1.0.0
Дата

Дата

Тип

Тип

aar
Описание

Описание

com.baha.url.preview
Help android developer easier to get url preview info
Ссылка на сайт

Ссылка на сайт

https://github.com/OneupNetwork/BahaUrlPreview
Система контроля версий

Система контроля версий

https://github.com/OneupNetwork/BahaUrlPreview

Скачать com.baha.url.preview

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/tw.com.oneup.www/com.baha.url.preview/ -->
<dependency>
    <groupId>tw.com.oneup.www</groupId>
    <artifactId>com.baha.url.preview</artifactId>
    <version>1.0.0</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/tw.com.oneup.www/com.baha.url.preview/
implementation 'tw.com.oneup.www:com.baha.url.preview:1.0.0'
// https://jarcasting.com/artifacts/tw.com.oneup.www/com.baha.url.preview/
implementation ("tw.com.oneup.www:com.baha.url.preview:1.0.0")
'tw.com.oneup.www:com.baha.url.preview:aar:1.0.0'
<dependency org="tw.com.oneup.www" name="com.baha.url.preview" rev="1.0.0">
  <artifact name="com.baha.url.preview" type="aar" />
</dependency>
@Grapes(
@Grab(group='tw.com.oneup.www', module='com.baha.url.preview', version='1.0.0')
)
libraryDependencies += "tw.com.oneup.www" % "com.baha.url.preview" % "1.0.0"
[tw.com.oneup.www/com.baha.url.preview "1.0.0"]

Зависимости

runtime (7)

Идентификатор библиотеки Тип Версия
org.jetbrains.kotlin : kotlin-android-extensions-runtime jar 1.4.32
org.jetbrains.kotlin : kotlin-stdlib jar 1.4.32
androidx.core » core-ktx jar 1.3.2
androidx.appcompat » appcompat jar 1.2.0
com.google.android.material » material jar 1.3.0
org.jetbrains.kotlinx : kotlinx-coroutines-android jar 1.3.9
org.jsoup : jsoup jar 1.13.1

Модули Проекта

Данный проект не имеет модулей.

BahaUrlPreview

Maven Central

The library help android developer easier to get url preview info.

100% Kotlin , use Kotlin-coroutines to fetch html code.

Inspire by LeonardoCardoso-SwiftLinkPreview,Android-Link-Preview!

Demo

device-2021-04-29-115050.mp4

How do I use BahaUrlPreview

Setup

//Top-level build.gradle
buildscript {
  ...
    repositories {
      mavenCentral()
      ...
    }
}

//project build.gradle
dependencies {
    ...
    implementation 'tw.com.oneup.www:Baha-UrlPreview:1.0.1'
}

Functions

val urlPreview = BahaUrlPreview(urlString, object : IUrlPreviewCallback {
                override fun onComplete(urlInfo: UrlInfoItem) {
                    //urlInfo.title -> is url preivew title
                    //urlInfo.description -> is url preview 
                    //urlInfo.image -> is url preview image
                 }

                override fun onFailed(throwable: Throwable) {
                   // in there control error
                 }
               })

urlPreview.fetchUrlPreview()


//avoid memory leak ,when activity or fragment destory need call BahaUrlPreview.cleanUp()

override fun onDestroy() {
  ...
   urlPreview.cleanUp()
}

Requirements

Android 5.+ (API 21)

Latest version

  • v1.0.1 (May 6 , 2021)

Recent Breaking Change Info

  • v1.0.1 1.add support to url that ends with image type (eg., .jpg

Developed By

OneupNetwork(SolinariWu)

License

MIT License

Copyright (c) 2021 OneupNetwork

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

tw.com.oneup.www

Версии библиотеки

Версия
1.0.0