Code Monkey home page Code Monkey logo

Comments (4)

stsaz avatar stsaz commented on August 27, 2024

a new MainActivity is created but the older one's onDestory() is not called

I don't understand why would Android create 2 instances of MainActivity class inside the same system process. In my understanding the system will call onStart() callback when the user returns to the activity, as shown here:
https://developer.android.com/guide/components/activities/activity-lifecycle#alc

However, if indeed that is the case, it looks like we can move some code out of onDestroy() callback into onStop() - this will remove the link between Core and old MainActivity. But first it's good to understand what exactly is happening here, step by step. I'll check this on my device.

this may result in some unexpected bug.

Is there some kind of crash (exception) here? Can you attach debug logs so I can look closer into it?

from phiola.

neoedmund avatar neoedmund commented on August 27, 2024

Is there some kind of crash (exception) here? Can you attach debug logs so I can look closer into it?

No error observed about this yet.

May you also to confirm that Svc.java created 2 filter into the filters ?

from phiola.

neoedmund avatar neoedmund commented on August 27, 2024

I'm giving up to understand Android,
Instead I made a workaround , see https://github.com/neoedmund/phiola/blob/beta/android/phiola/src/main/java/com/github/stsaz/phiola/Track.java#L303
It fixed all the problem even multi MainActivity are created, especially about Lyrics, which need to find the correct MainActivity's view to show the lyrics.

from phiola.

stsaz avatar stsaz commented on August 27, 2024

Nothing to do here from my side currently.
Please reopen in case you have some new info on this.

from phiola.

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.