Question

I have a music streaming app which holds a PARTIAL_WAKE_LOCK to avoid that the CPU goes to sleep while playing music in the background. It works fine, but sometimes Android still kills and restarts my service instantly.

Here's what I found in the logs in the moment when this happened:

Copying FileAsset 0x65ccb2f8 (zip:/data/app/com.my.app.apk:/resources.arsc) to buffer size 143364 to make it aligned.

I know that Android can always kill / restart my Activity and even service and that the lifecycle methods are to be used to deal with it. However, in this case the music stops while the user is listening and restarting the stream at the exact position is very hard in my case.

So, what is happening here? Why does Android need to copy the app resources? And can anything be done so Android does not see the need to do it or can do it without killing the app?

Was it helpful?

Solution

We had the same problem before, but it disappear after we build APK by Eclipse->File->Export->Export Android Application. The reason should be related to the tool - \android-sdk-windows\tools\zipalign.exe, it is only used when Export.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top