Configure ProGuard

Last updated: April 26, 2019

If you used the Gradle or Demo approach to import the JW Player SDK for Android or the JW Player SDK for Android Open Source Demo, JW Player'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 JW Player SDK for Android will work as intended.

ProGuard Configuration
-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.** { *; }

You can now configure the manifest.

Use this form to provide your feedback.