Skip to content

Commit

Permalink
Merge pull request #172 from Giphy/task/update-demo-2.1.14
Browse files Browse the repository at this point in the history
- update to SDK 2.1.14
  • Loading branch information
ALexanderLonsky authored Jan 11, 2022
2 parents de23182 + cb3e43d commit 27a0fba
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
13 changes: 12 additions & 1 deletion Docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
**Templates**
- [GiphyDialogFragment](#giphydialogfragment)
- [Fresco initialization](#fresco-initialization)
- [Exoplayer cache initialization](#exoplayer-cache-initialization)
- [Settings](#gphsettings-properties)
- [Theme](#theme)
- [Media Types](#media-types)
Expand Down Expand Up @@ -44,7 +45,7 @@ The latest release is available on [Maven Central](https://search.maven.org/arti

Add the GIPHY SDK dependency in the module ```build.gradle``` file:
```
implementation 'com.giphy.sdk:ui:2.1.13'
implementation 'com.giphy.sdk:ui:2.1.14'
```

### Configure your API key
Expand Down Expand Up @@ -117,6 +118,16 @@ Giphy.configure(
})
```

### Exoplayer cache initialization
The SDK has `Exoplayer` video cache setup.
It's enabled by default: the `videoCacheMaxBytes` value must be greater than 0, otherwise, the SDK will skip cache initialization and [Clips](https://github.com/Giphy/giphy-android-sdk/blob/main/clips.md) won't work.
```kotlin
Giphy.configure(
videoCacheMaxBytes: 100 * 1024 * 1024
)
```
You may want to skip this setup in case you use a different `Exoplayer` version that is incompatible with Giphy SDK but still want to get gifs from Giphy.

## GPHSettings properties

### _Theme_
Expand Down
13 changes: 12 additions & 1 deletion Docs_Java.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
**Templates**
- [GiphyDialogFragment](#giphydialogfragment)
- [Fresco initialization](#fresco-initialization)
- [Exoplayer cache initialization](#exoplayer-cache-initialization)
- [Settings](#gphsettings-properties)
- [Theme](#theme)
- [Media Types](#media-types)
Expand Down Expand Up @@ -44,7 +45,7 @@ The latest release is available on [Maven Central](https://search.maven.org/arti

Add the GIPHY SDK dependency in the module ```build.gradle``` file:
```
implementation 'com.giphy.sdk:ui:2.1.13'
implementation 'com.giphy.sdk:ui:2.1.14'
```

### Configure your API key
Expand Down Expand Up @@ -128,6 +129,16 @@ Giphy.INSTANCE.configure(DemoActivityJava.this,
});
```

### Exoplayer cache initialization
The SDK has `Exoplayer` video cache setup.
It's enabled by default: the `videoCacheMaxBytes` value must be greater than 0, otherwise, the SDK will skip cache initialization and [Clips](https://github.com/Giphy/giphy-android-sdk/blob/main/clips.md) won't work.
```kotlin
Giphy.INSTANCE.configure(DemoActivityJava.this,
...
100*1024*1024,
```
You may want to skip this setup in case you use a different `Exoplayer` version that is incompatible with Giphy SDK but still want to get gifs from Giphy.

## GPHSettings properties

### _Theme_
Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ dependencies {
implementation "androidx.appcompat:appcompat:1.1.0"
implementation "androidx.constraintlayout:constraintlayout:1.1.3"
implementation "com.google.android.material:material:1.1.0"
implementation "com.giphy.sdk:ui:2.1.13"
implementation "com.giphy.sdk:ui:2.1.14"
implementation 'com.github.bumptech.glide:glide:4.12.0'
implementation "com.squareup.leakcanary:leakcanary-android:1.6.3"
implementation "com.github.savvyapps:ToggleButtonLayout:1.2.0"
Expand Down

0 comments on commit 27a0fba

Please sign in to comment.