Giter Site home page Giter Site logo

Comments (5)

PhilippeBoisney avatar PhilippeBoisney commented on May 22, 2024

I confirm.

from inlineactivityresult.

whalemare avatar whalemare commented on May 22, 2024

Still reproduced on implementation 'com.github.florent37:inline-activity-result:1.0.2

from inlineactivityresult.

victor-denisenko avatar victor-denisenko commented on May 22, 2024

Hi

With option "don't keep activities" activity that call InlineActivityResult#startForResult() dies and ActivityResultFragment lose "listener" field value.

I think we cannot implement same behavior as default Activity#startActivityForResult(). Because, in that way, we must store ActivityResultFragment.ActivityResultListener interface througth death and recreation of process that cause memory leak (because listener stores link to context and cannot be saved in Bundle).

I didnt find way how to bount new activity with new ActivityResultFragment#onActivityResult() result. I looked at some other libraries, but they didnt solve this problem too.

But infinite loop can be fixed (i work on it).

from inlineactivityresult.

sevar83 avatar sevar83 commented on May 22, 2024

@victor-denisenko In theory the ViewModel of the caller should survive activity destruction (not process death) so if it is implementing ActivityResultListener and not its fragment/activity then the listener will survive too.
In case of a process death there won't be any memory leak because normally the entire app will be restarted. So preserving an arbitrary callback across process death is impossible.

from inlineactivityresult.

florent37 avatar florent37 commented on May 22, 2024

google just fixed that : https://developer.android.com/training/basics/intents/result

from inlineactivityresult.

Related Issues (13)

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.