• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Himai Minh
  • Carey Brown
  • salvin francis

Don't keep activities

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A problem I have got to solve is to deal with Developer Options->Don't keep activities.

There is a complex system with a number of various classes of activities defined. It works properly when aforesaid option is OFF. However it works wrong when the option is ON,

I am striving with it for some time without result. My approach is to perform the same operation when option is OFF then when it is ON. Then compare logcat.

How to trace Activities manager to find when it goes wrong ?

Java 8, Android. System developed with Android Studio 4.0.1
 
Saloon Keeper
Posts: 6704
161
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can write messages to the logcat from the Activity's lifecycle methods. Then you'll know what gets vacated when, and at what point things start to go wrong.

But the whole issue sound strange - are the activities somehow dependent upon one another? Do their lifeycycle methods too much or too little?
 
Igor Janick
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for answer.

So I do. However there is a whirlpool of Acctivities and I'm losing track.
I think how to get logcat messages (or something like) from the Activities manager.

BTW. title of my task is: improve performance when "Don't keep activities" is ON.
So I try to find where to repair it.
 
Tim Moores
Saloon Keeper
Posts: 6704
161
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why is there "a whirlpool of activities"? Why does the app open several activities at once? That's extremely unusual, and may point to a problem.
 
Igor Janick
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not at once.
When I put Logger.info() in methods of important events I have an impression that some activities have passed by.

May be I have not noticed when they were shown up. The manager would provide an answer related to order.
 
Rancher
Posts: 3965
36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

a whirlpool of Acctivities  


Can you copy the contents of the logcat that shows what you are talking about and paste it here so we can see?

Add some comments that define the problem with what is shown in the logcat.
 
Igor Janick
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for response.

There is https://xfl.jp/6TWojx dont-keep-activities.zip with two files:

17-11-OFF.txt - logcat of refund operation when Don't keep activities is set OFF (a normal case)
17-11-OFF.txt - logcat of refund operation when Don't keep activities is set ON (the case I have to improve)

Files are large beacause a number of programmers maintained the code. So I had to extract a part related to aforesaid operation only.

This forum does not allow to submit neither text nor zip files thus I decided to use link.
 
Norm Radder
Rancher
Posts: 3965
36
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't post the whole logcat, just a few 100 lines to show what you are talking about.  add some comments where appropriate.

Be sure to add some comments where you have questions about what is shown in the logcat.
 
Try 100 things. 2 will work out, but you will never know in advance which 2. This tiny ad might be one:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic