Skip to content
This repository has been archived by the owner on Dec 2, 2019. It is now read-only.

ReadMe updates to include cancellation and pro guard settings #20

Merged
merged 1 commit into from Aug 5, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.md
Expand Up @@ -36,6 +36,14 @@ dependencies {
}
```

### ProGuard
If you use ProGuard, it is advised that you keep the jsoup dependencies by adding
```groovy
-keeppackagenames org.jsoup.nodes
```
to your ProGuard rules file.


## Usage
#### Instantiating
```java
Expand Down Expand Up @@ -65,6 +73,16 @@ LinkPreviewCallback linkPreviewCallback = new LinkPreviewCallback() {
```java
textCrawler.makePreview( linkPreviewCallback, url);
```
#### Cancel unfinished tasks when views are destroied.
If you are using Android Link Preview inside of an Activity, it is important to cancel unfinished Preview activites at the end of the Activity's lifecycle.

```java
@Override
protected void onDestroy() {
super.onDestroy();
textCrawler.cancel();
}
```

Apps using Android Link Preview
=================================
Expand Down