apptentive / apptentive-android

Apptentive Android SDK
http://www.apptentive.com
BSD 3-Clause "New" or "Revised" License
65 stars 64 forks source link

Event 'com.apptentive#app#launch' for a version is not 0 on fresh install #223

Closed cweggler closed 3 years ago

cweggler commented 3 years ago

Hello Apptentive Team,

We have a Love Dialog in our app that is set to show once to a user after 5 launches of the app if the person_data user_30_days is true, and the invokes for event com.apptentive#EnjoymentDialog#launch is 0. However in our latest release, our quality analyst noticed that the Love dialog actually displayed on the first launch of the fresh install of our latest release.

In debugging, looking at the Apptentive Logs where config.logLevel = ApptentiveLog.Level.VERBOSE, I was also able to reproduce this issue in our debug environment on a Google Pixel Emulator with OS: Android 8 (API 26).

I have attached a txt file with the logs. But notice the line com.apptentive#app#launch for version name myfiles-p3 (2) is greater than or equal to 2 That wouldn't be weird except this launch was on a fresh install of the app, so it shouldn't have had any previous launches at all and should evaluate to (0).

Please let me know if you need any more information to look into this issue or have suggestions for our team to try out! Thank you! apptentiveLogsWithBug.txt

CaseyApptentive commented 3 years ago

Hi @cweggler. Thanks for the thorough report. There don't appear to be any known issues related to this.

Typically uninstalling + reinstalling should reset all counts, as you and your team did. Is this issue easy for you to reproduce?

If so and it wouldn't be too much of an ask, one other thing you could try is clearing the app cache. To do this, have the app installed on your test device and have it fully closed (not backgrounded) > long tap the app icon > App Info > Storage & cache > Clear Storage and hit okay.

Screenshot_20210325-153034

Then launch the app and try to launch the Love Dialog again. We'd expect this to make the count start back at zero, so it would take several launches for you to see the Love Dialog.

Let me know if that works.

cweggler commented 3 years ago

Hi @CaseyApptentive - Thanks for your reply. We worked with your support team and they recommended just that- clearing storage and cache and that worked for us! We communicated that necessary step to our quality analysts. Thanks again!

CaseyApptentive commented 3 years ago

Perfect. Thanks for confirming.