Coder Social home page Coder Social logo

slimgress's People

slimgress's Issues

Replace activities with dialogs (??) to prevent crashes

Problem:
Activities in Android aren't guaranteed to remain alive when they're not being used. Slimgress switches to an OPS activity to show inventory (etc) and it switches to a PORTAL activity to show portal information. In some cases, the Scanner activity can be killed when the user is in OPS/PORTAL, which will result in a crash, loss of sync, or undefined behaviour.
I think that you can test it by turning on "do not keep background activities" in Developer Tools.

Proposed solution 1:
Convert OPS, PORTAL and any future game child-screens to dialogs, make the game run in a single activity. Doing this would remove the hassle of inter-activity communication, and allow the map to be drawn in DEPLOY/RECHARGE screens, which would be handy. It could also solve the problem of remote portal viewing.
Not sure about downsides of this method. Memory use, etc? Also, potentially a lot of work once remote viewing/recharging becomes possible. Then again, remote viewing/recharging are in the future at the moment so maybe not really relevant to analysis of this solution.

Proposed solution 2:
Do nothing. The problem will generally go unnoticed, and this client is intended for PoC/development, so making it run perfectly in all situations is out of scope

In any event, I'm aware of this potential problem and making a note of it here for later.

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.