Giter VIP home page Giter VIP logo

bugyun / avoidonresulthelper Goto Github PK

View Code? Open in Web Editor NEW
16.0 16.0 2.0 184 KB

避免 onActivityResult 和 onRequestPermissionsResult 烦恼requestCode的问题,帮助快速开发~~

Home Page: https://blog.ruoyun.vip/post/%E5%A4%A7%E8%83%B8%E5%BC%9F-requestcode%E8%BF%98%E5%9C%A8%E5%9B%B0%E6%89%B0%E4%BD%A0%E5%98%9B/

License: Apache License 2.0

Java 100.00%
activityresult android android-library helper-tool permission-android

avoidonresulthelper's People

Contributors

bugyun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

liuhao722 haonan1

avoidonresulthelper's Issues

异常奔溃not attached to Activity

在实际使用中有时会出现奔溃,报错信息:java.lang.IllegalStateException: Fragment AvoidOnResultFragment{427229a} (01ae2f57-b263-4c79-87cc-e5c405cdb5e9) RYAvoidOnResultHelper} not attached to Activity

at androidx.fragment.app.Fragment.startActivityForResult(Fragment.java:1420)

at vip.ruoyun.helper.avoid.AvoidOnResultFragment.startActivityForResult(AvoidOnResultFragment.java:60)

at vip.ruoyun.helper.avoid.AvoidOnResultHelper.startActivityForResult(AvoidOnResultHelper.java:63)

at vip.ruoyun.helper.avoid.AvoidOnResultHelper.startActivityForResult(AvoidOnResultHelper.java:58)

估计在activity重建时,AvoidOnResultFragment中的startActivityForResult 因为AvoidOnResultFragment脱离了activity绑定,导致此奔溃,建议用到context相关的地方,需要判断isAdded()

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.