codyengel / flax Goto Github PK
View Code? Open in Web Editor NEWFlax is another way to build Android applications.
License: Apache License 2.0
Flax is another way to build Android applications.
License: Apache License 2.0
Since Android is unpredictable it would probably be a good idea to allow the Store to survive process death: https://medium.com/inloop/android-process-kill-and-the-big-implications-for-your-app-1ecbed4921cb
Currently device rotation works fine, however if the application is killed and you return none of the data remains, even worse if you are in an area of the app expecting data to be there the application will crash.
There are a few options out there:
In either case these are the important callbacks in order of when they are called:
onActivitySaveInstanceState would probably make the most sense since that's traditionally where you would want to save state.
Currently the Model emits itself when changes are made, this isn't ideal for a number of reasons:
There haven't been issues with the model yet in the sample projects but it's probably better to take care of this problem sooner rather than later.
Completely remove Rx from the Flax module. Updating sample apps will be a separate issue.
Add unit tests for the Flax module to ensure the module works as intended.
Currently the FlaxAction types are fairly primitive and should be updated to support a wider range of default Action types.
These actions include callbacks from View, TextView, EditText, System (Activity, Fragment, etc), as well as others. Looking over RxBindings will likely give a good idea of what should be supported in terms of view callbacks. System callbacks will likely need to be custom and creating an AbstractFlaxActivity, AbstractFlaxFragment, and AbstractFlaxViewGroup with observables for each lifecycle event will likely be useful.
We aren't savages, so add JavaDoc to the Flax module. This will include class and method documentation.
Flax needs to be properly released to jCenter so that it can be easier to include in projects.
05-02 18:48:54.869 1956-1956/com.codyengel.simplenetworking E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.codyengel.simplenetworking, PID: 1956
java.lang.RuntimeException: Unable to resume activity {com.codyengel.simplenetworking/com.codyengel.simplenetworking.ui.list.ListActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'io.reactivex.Observable com.codyengel.flax.FlaxModel.getObservable()' on a null object reference
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2986)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3017)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2392)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'io.reactivex.Observable com.codyengel.flax.FlaxModel.getObservable()' on a null object reference
at com.codyengel.flax.FlaxRenderer.getObservable(FlaxRenderer.java:51)
at com.codyengel.flax.FlaxRenderer.<init>(FlaxRenderer.java:35)
at com.codyengel.simplenetworking.ui.list.ListRenderer.<init>(ListRenderer.java:32)
at com.codyengel.simplenetworking.ui.list.ListActivity.createRenderer(ListActivity.java:77)
at com.codyengel.simplenetworking.AbstractFlaxActivity.onResume(AbstractFlaxActivity.java:50)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1257)
at android.app.Activity.performResume(Activity.java:6076)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2975)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3017)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2392)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.