title: Proguard rule for Billdesk Android SDK
body: <p>I am facing problem for applying <code>ProGuard</code> to <strong>Billdesk SDK</strong>.</p>
  
  <p>If I build apk without ProGuard then work fine, But if build with ProGuard then getting error as,</p>
  
  <blockquote>
    <p>SDK not initialised properly.</p>
  </blockquote>
  
  <p>Current ProGuard rules for my Application look like,</p>
  
  <pre><code># code for optimazation
  -dontnote org.json.**
  -dontwarn org.apache.http.**
  -dontnote org.apache.http.**
  -dontwarn android.net.http.AndroidHttpClient
  -dontnote android.net.http.**
  
  #OKHTTP
  -keepattributes Signature
  -keepattributes *Annotation*
  -keep class okhttp3.** { *; }
  -keep interface okhttp3.** { *; }
  -dontwarn okhttp3.**
  
  -dontwarn okio.**
  
  
  # Retrofit 2.X
  ## https://square.github.io/retrofit/ ##
  
  -dontwarn retrofit2.**
  -keep class retrofit2.** { *; }
  -keepattributes Signature
  -keepattributes Exceptions
  
  -keepclasseswithmembers class * {
      @retrofit2.http.* &lt;methods&gt;;
  }
  
  # Simple-Xml Proguard Config
  # NOTE: You should also include the Android Proguard config found with the build tools:
  # $ANDROID_HOME/tools/proguard/proguard-android.txt
  
  # Keep public classes and methods.
  -dontwarn com.bea.xml.stream.**
  
  -dontwarn org.simpleframework.xml.stream.**
  -dontwarn javax.xml.**
  
  -keep public class org.simpleframework.**{ *; }
  -keep class org.simpleframework.xml.**{ *; }
  -keep class org.simpleframework.xml.core.**{ *; }
  -keep class org.simpleframework.xml.util.**{ *; }
  
  -keepattributes Signature
  -keepattributes *Annotation*
  
  # Ignore our XML Serialization classes
  -keep public class packagename.model.ServerResponse{
    public protected private *;
  }
  -keep public class packagename.model.ServerRequest{
    public protected private *;
  }
  
  -keep public class packagename.activity.ProceedToPayActivity{
    public protected private *;
  }
  
  
  
  -keep public class packagename.model.ServerResponseHeader{
    public protected private *;
  }
  
  
  #
  #-dontwarn com.bea.xml.stream.**
  #
  #-keep class org.simpleframework.xml.**{ *; }
  #-keepclassmembers,allowobfuscation class * {
  #    @org.simpleframework.xml.* &lt;fields&gt;;
  #    @org.simpleframework.xml.* &lt;init&gt;(...);
  #}
  
  
  
  -keep class com.jamesmurty.** { *; }
  -dontwarn com.jamesmurty.utils.**
  
  ##
  ##Billdesk rules
  -keep public class com.billdesk.sdk.*
  -keep public class com.billdesk.config.*
  -keep public class com.billdesk.utils.URLUtilActivity
  -keep public interface com.billdesk.sdk.LibraryPaymentStatusProtocol{
  public void paymentStatus(java.lang.String,android.app.Activity);
  }
  -keep class com.billdesk.sdk.PaymentWebView$JavaScriptInterface{
  public void gotMsg(java.lang.String);
  }
  -keepclassmembers class * {
  @android.webkit.JavascriptInterface &lt;methods&gt;;
  }
  -keepattributes JavascriptInterface
  -keep public class com.billdesk.sdk.PaymentWebView$JavaScriptInterface
  -keep public class * implements com.billdesk.sdk.PaymentWebView$JavaScriptInterface
  -keepclassmembers class com.billdesk.sdk.PaymentWebView$JavaScriptInterface {
  &lt;methods&gt;;
  }
  </code></pre>