Configure ProGuard (Android v3)

View the suggested configuration for ProGuard.


If you used Gradle to import the JWP SDK for Android 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.

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