Proguard & Pollfish

There is a new app that we are working on and we are integrating Pollfish on it but proguard is preventing pollfish survey to appear…Though disabling proguard completely will solve the problem but that is not an option and we don’t want to do that… Default proguard config given from Pollfish website doesn’t work and I don’t see any error in the logs related to Pollfish…

Did you encounter the same problem before? Thanks!

For me it’s working fine with just this
-keep class com.pollfish.** { *; }

What warnings do you get about proguard?

No warnings… Very clean upon building no pollfish related warnings but there is one note saying

Note: com.pollfish.util.layout.b accesses a declared field ‘mFrameOffsets’ dynamically

Hello @romel_emperado as said privately we are looking into this internally. It should work, but maybe some other flag is needed. We will provide a solution. The warning provided above is irrelevant with the issue though. Thank you for your patience!

I also have the same issue. The pollfish widget was appearing in debug mode, but when using a signed release version that has been obfuscated with proguard, it doesn’t show up.

I have this in my proguard rules:
-keep class com.pollfish.** { *; }

I am using:
compile ‘’
compile ‘’
compile ‘com.pollfish:pollfish:+:googleplayRelease@aar’

hello @Aldasa do you see any warnings when signing your apk that are relevant to Pollfish? When you run your signed apk what logs do you see? Please do drop me an email at [email protected] to look into this asap! thanks in advance for your patience

Sorry for the late reply.

I missed this in the docs:

| Note: Using Proguard with Pollfish requires setting your Project Build Target to Android 5.0 (API 21)! 

Im using:

minSdkVersion 16
targetSdkVersion 23

@Aldasa so now it works fine? If you need further help please do let me know, I will be happy to help.


| Note: Using Proguard with Pollfish requires setting your Project Build Target to Android 5.0 (API 21)!

I am assuming that it means to say at least API 21 and I can target API 22 in my project and it should also work… I haven’t much time to solve this problem so I released my new app few months ago without Pollfish…

Hello @romel_emperado. I advice you update to latest version of Pollfish .It should not take more than 2 minutes.

and in proguard just add this:

-dontwarn com.pollfish.**
-keep class com.pollfish.** { *; }

If you need further help please let me know :slight_smile:

Hi guys. Another solution to avoid such kind of issues is to use a code-free APK protection, which does not interfere with your ads setup or whatever.

Please check out Appwatermark project. It is a side project of Addvertize network and it will be launched soon. Basically it will give you a protection from:

-reverse engineering
-ads/in-app billing etc removal
-any kind of injections or manipulations with source code

No coding required, just an APK file and couple of minutes are needed, which is extremely handy.

the best part here is that it will be affordable for indie developers, not to say about several free “welcome” integrations :slight_smile: