Configure ProGuard (FireTV)

View the suggested configuration for ProGuard.


If you used Gradle to import the JWP Android or Fire TV SDK or downloaded the JWP SDK for Android Open Source Demo, JWP's configuration has been applied automatically. You can skip this article and configure the manifest.


If you used the Local approach, no ProGuard configuration has been added. If you choose to obfuscate your code with ProGuard, add the following ProGuard configuration.

This suggested ProGuard configuration ensures that the JWP SDK for Android will work as intended.

-keepclassmembers class com.longtailvideo.jwplayer.** {
   @android.webkit.JavascriptInterface *;

# Block warnings about missing module classes
-dontwarn com.longtailvideo.jwplayer.**

# Classes get rejected without this when running the app if the app has been run through ProGuard
-keepattributes InnerClasses,EnclosingMethod

# Keep module indicator classes
-keep class com.longtailvideo.jwplayer.modules.** { *; }

# JSR 305 annotations are for embedding nullability information.
-dontwarn javax.annotation.**

# A resource is loaded with a relative path so the package of this class must be preserved.
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase

# Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java.
-dontwarn org.codehaus.mojo.animal_sniffer.*

# OkHttp platform used only on JVM and when Conscrypt dependency is available.
-dontwarn okhttp3.internal.platform.ConscryptPlatform

-keep class** { *; }

-keep class** { *; }