{"_id":"5b9290d786403b00037eec8f","project":"54aa7f773b56130b0056c86e","version":{"_id":"55781fe25129590d003ff4f7","project":"54aa7f773b56130b0056c86e","forked_from":"54aa7f773b56130b0056c871","__v":6,"createdAt":"2015-06-10T11:30:42.700Z","releaseDate":"2015-06-10T11:30:42.700Z","categories":["55781fe35129590d003ff4f8","55781fe35129590d003ff4f9","55781fe35129590d003ff4fa","55781fe35129590d003ff4fb","55781fe35129590d003ff4fc","55781fe35129590d003ff4fd","55781fe35129590d003ff4fe","564bbc7e8841060d00abb2ee","565b66c446118c0d00dcb0bb","56898269f8dc340d00308c13","582318b23b961a0f009516a1","594a848c9f4771001a43c959"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Developers","version_clean":"2.0.0","version":"2.0"},"category":{"_id":"55781fe35129590d003ff4fc","pages":["55781fe45129590d003ff50d","55781fe45129590d003ff50e","55781fe45129590d003ff50f","55781fe45129590d003ff510","55781fe45129590d003ff511","55781fe45129590d003ff512","55781fe45129590d003ff513","55781fe45129590d003ff514","55781fe45129590d003ff515","55781fe45129590d003ff516","55f692b4fe4cce21005c78b0","55f7e91e60cc850d008a7a45","56333cab9c607719001b85e4","564462ed9ce94c0d00068ce9","564f54fa48a1df1700836653","565ee9e7413e06170093dde0","5661a8fdb401c70d00dde6fa","5671348860c8e70d006c96a1","568ce9707d3bf02300aa7734"],"version":"55781fe25129590d003ff4f7","__v":10,"project":"54aa7f773b56130b0056c86e","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-01-05T12:44:00.338Z","from_sync":false,"order":4,"slug":"android-sdk","title":"Android SDK"},"user":"57bc3654b9c7f0220009c77b","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-09-07T14:53:11.312Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"As of version 2.13.6 the PulsateSDK imports with Proguard settings, turning on Proguard will automatically run the PulsateSDK settings.\n\nFor projects that use an older PulsateSDK version please add the following rules to your Proguard settings.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"# PulsateSDK classes\\n-keep class com.pulsatehq.** {*;}\\n-keepclassmembers class com.pulsatehq.** {*;}\\n\\n# Realm\\n-keep class io.realm.annotations.RealmModule\\n-keep :::at:::io.realm.annotations.RealmModule class *\\n-keep class io.realm.internal.Keep\\n-keep @io.realm.internal.Keep class *\\n-dontwarn javax.**\\n-dontwarn io.realm.**\\n\\n\\n##---------------Begin: proguard configuration for Gson  ----------\\n# Gson uses generic type information stored in a class file when working with fields. Proguard\\n# removes such information by default, so configure it to keep all of it.\\n-keepattributes Signature\\n\\n# For using GSON @Expose annotation\\n-keepattributes *Annotation*\\n\\n# Gson specific classes\\n-dontwarn sun.misc.**\\n\\n# Application classes that will be serialized/deserialized over Gson\\n-keep class com.google.gson.examples.android.model.** { *; }\\n\\n# Prevent proguard from stripping interface information from TypeAdapterFactory,\\n# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)\\n-keep class * implements com.google.gson.TypeAdapterFactory\\n-keep class * implements com.google.gson.JsonSerializer\\n-keep class * implements com.google.gson.JsonDeserializer\\n##---------------End: proguard configuration for Gson  ----------\\n\\n\\n##---------------Begin: proguard configuration for Retrofit  ----------\\n# Retrofit does reflection on generic parameters and InnerClass is required to use Signature.\\n-keepattributes Signature, InnerClasses\\n\\n# Retain service method parameters when optimizing.\\n-keepclassmembers,allowshrinking,allowobfuscation interface * {\\n    @retrofit2.http.* <methods>;\\n}\\n\\n# Ignore annotation used for build tooling.\\n-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement\\n\\n# Ignore JSR 305 annotations for embedding nullability information.\\n-dontwarn javax.annotation.**\\n\\n# Guarded by a NoClassDefFoundError try/catch and only used when on the classpath.\\n-dontwarn kotlin.Unit\\n\\n# Top-level functions that can only be used by Kotlin.\\n-dontwarn retrofit2.-KotlinExtensions\\n##---------------End: proguard configuration for Retrofit  ----------\\n\\n\\n# OkHttp\\n-dontwarn okhttp3.internal.platform.*\\n\\n# Glide\\n-keep public class * implements com.bumptech.glide.module.GlideModule\\n-keep public class * extends com.bumptech.glide.module.AppGlideModule\\n-keep public enum com.bumptech.glide.load.ImageHeaderParser$** {\\n  **[] $VALUES;\\n  public *;\\n}\\n\\n#AltBeacon\\n-dontwarn org.altbeacon.**\\n-keep class org.altbeacon.** { *; }\\n-keep interface org.altbeacon.** { *; }\\n\\n# EventBus\\n-keepattributes *Annotation*\\n-keepclassmembers class * {\\n    @org.greenrobot.eventbus.Subscribe <methods>;\\n}\\n-keep enum org.greenrobot.eventbus.ThreadMode { *; }\\n\\n# EventBus Only required if you use AsyncExecutor\\n-keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {\\n    <init>(java.lang.Throwable);\\n}\\n\\n# Evernote Android Job\\n-dontwarn com.evernote.android.state.**\\n-keep class com.evernote.android.state.** { *; }\\n-keep class **$$StateSaver { *; }\\n-keepclassmembers class * {\\n    @com.evernote.android.state.StateReflection <fields>;\\n}\\n\\n# GreenDao\\n-keepclassmembers class * extends org.greenrobot.greendao.AbstractDao {\\npublic static java.lang.String TABLENAME;\\n}\\n-keep class **$Properties\\n\\n# If you do not use SQLCipher:\\n-dontwarn org.greenrobot.greendao.database.**\\n# If you do not use Rx:\\n-dontwarn rx.**\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"using-proguard","type":"basic","title":"Using Proguard"}
As of version 2.13.6 the PulsateSDK imports with Proguard settings, turning on Proguard will automatically run the PulsateSDK settings. For projects that use an older PulsateSDK version please add the following rules to your Proguard settings. [block:code] { "codes": [ { "code": "# PulsateSDK classes\n-keep class com.pulsatehq.** {*;}\n-keepclassmembers class com.pulsatehq.** {*;}\n\n# Realm\n-keep class io.realm.annotations.RealmModule\n-keep @io.realm.annotations.RealmModule class *\n-keep class io.realm.internal.Keep\n-keep @io.realm.internal.Keep class *\n-dontwarn javax.**\n-dontwarn io.realm.**\n\n\n##---------------Begin: proguard configuration for Gson ----------\n# Gson uses generic type information stored in a class file when working with fields. Proguard\n# removes such information by default, so configure it to keep all of it.\n-keepattributes Signature\n\n# For using GSON @Expose annotation\n-keepattributes *Annotation*\n\n# Gson specific classes\n-dontwarn sun.misc.**\n\n# Application classes that will be serialized/deserialized over Gson\n-keep class com.google.gson.examples.android.model.** { *; }\n\n# Prevent proguard from stripping interface information from TypeAdapterFactory,\n# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)\n-keep class * implements com.google.gson.TypeAdapterFactory\n-keep class * implements com.google.gson.JsonSerializer\n-keep class * implements com.google.gson.JsonDeserializer\n##---------------End: proguard configuration for Gson ----------\n\n\n##---------------Begin: proguard configuration for Retrofit ----------\n# Retrofit does reflection on generic parameters and InnerClass is required to use Signature.\n-keepattributes Signature, InnerClasses\n\n# Retain service method parameters when optimizing.\n-keepclassmembers,allowshrinking,allowobfuscation interface * {\n @retrofit2.http.* <methods>;\n}\n\n# Ignore annotation used for build tooling.\n-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement\n\n# Ignore JSR 305 annotations for embedding nullability information.\n-dontwarn javax.annotation.**\n\n# Guarded by a NoClassDefFoundError try/catch and only used when on the classpath.\n-dontwarn kotlin.Unit\n\n# Top-level functions that can only be used by Kotlin.\n-dontwarn retrofit2.-KotlinExtensions\n##---------------End: proguard configuration for Retrofit ----------\n\n\n# OkHttp\n-dontwarn okhttp3.internal.platform.*\n\n# Glide\n-keep public class * implements com.bumptech.glide.module.GlideModule\n-keep public class * extends com.bumptech.glide.module.AppGlideModule\n-keep public enum com.bumptech.glide.load.ImageHeaderParser$** {\n **[] $VALUES;\n public *;\n}\n\n#AltBeacon\n-dontwarn org.altbeacon.**\n-keep class org.altbeacon.** { *; }\n-keep interface org.altbeacon.** { *; }\n\n# EventBus\n-keepattributes *Annotation*\n-keepclassmembers class * {\n @org.greenrobot.eventbus.Subscribe <methods>;\n}\n-keep enum org.greenrobot.eventbus.ThreadMode { *; }\n\n# EventBus Only required if you use AsyncExecutor\n-keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {\n <init>(java.lang.Throwable);\n}\n\n# Evernote Android Job\n-dontwarn com.evernote.android.state.**\n-keep class com.evernote.android.state.** { *; }\n-keep class **$$StateSaver { *; }\n-keepclassmembers class * {\n @com.evernote.android.state.StateReflection <fields>;\n}\n\n# GreenDao\n-keepclassmembers class * extends org.greenrobot.greendao.AbstractDao {\npublic static java.lang.String TABLENAME;\n}\n-keep class **$Properties\n\n# If you do not use SQLCipher:\n-dontwarn org.greenrobot.greendao.database.**\n# If you do not use Rx:\n-dontwarn rx.**", "language": "text" } ] } [/block]