Coder Social home page Coder Social logo

Comments (6)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 17, 2024
understood. turns out this is not very easy to fix, at least with how i have 
the app structured now. here is why,

i could save the current set of log entries when the app pauses, and restore 
them when it is resumed. it could remember the pause. however, what it cannot 
remember is the context of where it was paused at. for example, suppose you 
have log entries 

1
2
3
4

and you pause the log. now the app is paused (screen goes dark). now you wake 
your device up and the screen again shows 

1 
2
3

now you play the log. since the app was paused, all it can do is load *all* of 
the log entries again. so you'd end up with a log like,

1
2
3
1
2
3
4
5

or something.

normally, how pause works is that it keeps reading the log entries and saves 
them up in memory until the user hits play. this way it doesn't lose the 
context of what it has already logged and what it needs to log after the user 
plays the log. 

perhaps, the right thing to do is just re-load all of the logs after a pause 
then play, and restore the log's paused state after an app resume. this 
degrades the pause functionality to some degree i think though.

Original comment by [email protected] on 14 Nov 2010 at 4:08

  • Changed state: Accepted

from alogcat.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 17, 2024
i have a prototype of this. could you give it a try?
http://code.google.com/p/alogcat/downloads/detail?name=alogcat-2.1.4.1.apk

when unpaused (played), it will re-read all the logs. it will not lose the 
state on orientation changes or screen blanks though, hopefully.

Original comment by [email protected] on 14 Nov 2010 at 7:20

from alogcat.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 17, 2024
Just installed and tried 2.1.4.1 - covers my use case perfectly!
From your explanation above I now understand why this is not an easy thing to 
do. 

My use of pause is usually this, maybe this helps:

- i start alogcat because of a) general curiosity or b) tracking an error to 
report the details to a developer. 
- when doing a), the old-pause serves better than the new-pause because I am 
able to pause for a moment and then go on quickly. 
- when doing b) I am just interested in one specific error that i want to keep 
displaying for as long as it takes me to read/transcribe/send/save the log. 
When i am done then i close it again.
the new-pause works much better in this case because of the screen 
blanking/locking. 




Original comment by [email protected] on 14 Nov 2010 at 8:31

from alogcat.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 17, 2024
updated test build,
http://code.google.com/p/alogcat/downloads/detail?name=alogcat-2.1.4.2.apk

with this one, as long as you don't rotate or let the screen blank, pause / 
play should work like before (case a). if you rotate etc. however you will get 
behavior b.

this also fixes several bugs that i introduced. as of now this is the candidate 
market build for 2.5.

Original comment by [email protected] on 15 Nov 2010 at 4:52

from alogcat.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 17, 2024
another possibility is to always restore the state, and *smartly* concat the 
new logcat output onto it. by smartly, i mean it would have to check if the log 
entry exists in the restored state. that means comparing it to every log entry. 
worse, there's not really a way to tell when to stop doing the compares, so in 
general it would happen for every cat'd log entry. this is probably not an 
option for performance reasons.

Original comment by [email protected] on 15 Nov 2010 at 4:59

from alogcat.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 17, 2024

Original comment by [email protected] on 25 Nov 2010 at 4:37

  • Changed state: Fixed

from alogcat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.