Weird behaviour while updating the apk

  • Issue category: Semantic Segmentation / ARDK Documentation
  • Device type & OS version: Android
  • Host machine & OS version: Windows
  • Issue Environment : On Device
  • ARDK version: 2.3.0
  • Unity version:2021.3.2.f1

Description of the issue:
Hi,
I created an AR application using ARDK, which has ARDK’s depth-based occlusion feature. I installed the application, and everything worked fine for me. But updating the apk with a newer version causes weird behaviour in occlusion. The objects placed in the AR environment are not visible, and the only way to make them visible is by switching the occlusion mode to none. I noticed everything worked perfectly while we built the apk directly on the phone. But downloading the new version of the apk and updating the existing one caused the issue. Can anyone provide any solutions or suggestions to get rid of this problem?

Hi Naveen,

May I know what you mean when you say you updated the APK? Do you just mean that you made some changes in your project and loaded in the new APK with those changes into your Android device?

I also see that you’re on ARDK 2.3, we’ve recently released 2.4, if it’s possible for you to upgrade I would recommend it. Updating to the latest ARDK has resolved issues for users in the past as well :slight_smile:

Yes, you are correct. I made some changes and built a new apk, which I installed without uninstalling the previous one.
And I used ARDK 2.4.1 as well but am still facing that issue.

Hi Naveen,

Thank you for your patience.

I was unable to reproduce a similar issue. Would it be possible to get a video of the problem and also a screenshot of the ARDepthManager in your project to see how it’s configured?

Hi @Jesus_Hernandez
Thank you for your reply.
I managed to solve the issue. The issue is related to the cache. Everything worked well when the older apk’s cache was cleared.

Well, do you have any idea how to clear older version apk’s cache programmatically. I used Caching.ClearCache() but it works only for the current version.

Hi Naveen,

I looked into this and that seems to be the only facility that Unity has to remove cache. To completely empty out the cache it would have to be done manually. I’m unsure if there is any other way (possibly with an Android Studio integration) but that would be beyond the scope of what we can support.