Start a new topic

Release of Resources on Activity Close

Release of Resources on Activity Close

On Android, are the resources automatically released when the activity with architectView is destroyed?

I have an app and it seems like GPS is still running after my app is closed.

I think I figured it out. On Destroy of activity is not being called and from what I read, it may not be called sometimes.

Should architectView.onDestroy() be called in the activities on Destroy method or is it better to do so in the onStop method?

Even after moving the ArchitectView.onDestory to the onStop method of the activity, it seems to be not releasing the GPS resource.

I can confirm that it is the app that is not releasing the GPS resource becuase when I forcefully kill the app the GPS polling stops.

Why is that? Why is the GPS resource not being released?

Hi Dennis!

Please note: Wikitude's Android SDK does not register any GPS listeners - Please have a look at your code any check where you use locationManager and ensure to remove/register locationListener in onPause/onResume of your activity.

Kind regards,
Login or Signup to post a comment