Comments (6)
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.
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.
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.
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.
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.
Original comment by [email protected]
on 25 Nov 2010 at 4:37
- Changed state: Fixed
from alogcat.
Related Issues (20)
- Enhancment request: search button as shortcut for filter HOT 2
- RFE: Allow another activity to invoke alogcat with settings HOT 3
- Auto-save duplicates log entries HOT 2
- save is oblivious of mount error HOT 1
- logging in sleep/standby mode?? HOT 2
- Create a widget
- Option to prevent screen turning off / going into standby HOT 2
- Not tracking all logs. HOT 6
- Stock music player not playing any media files HOT 1
- user-defined Save location
- to many GC_EXTERNAL_ALLOC log messages. HOT 5
- Triggering saving to the SDCard with intents opens a security hole HOT 1
- make localizable
- Allow donations without proprietary software HOT 3
- Feature request: Toast shows active filter (patch included) HOT 3
- Feature request: User can enter a comment when saving (maybe optionally via settings) HOT 4
- Will not work on Android 4.1 Jelly Beans HOT 5
- logcat not displayed in jelly bean 4.1.1 HOT 7
- Make it movable to SD card HOT 1
- Saved logs are not visible over MTP until a media scan is performed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alogcat.