arizona_android (arizona v0.4.0)
View SourceBuilders for Android client effects, used inside ?native views.
Each function returns an arizona_effect:cmd/0 tuple
{arizona_effect, [OpCode | Args]} -- the shared wire format every client
command module produces (op codes in include/arizona_effect.hrl), encoded by
arizona_effect:encode_json/1. Use them as event props (on_tap, ...) or as
effects from handle_event/3.
Commands are per platform on purpose: a native view reaches for arizona_android
(not the browser's arizona_js), and this module is the home for Android-specific
commands as they're added. push_event/navigate mirror their web counterparts.
{'Button', [{on_tap, arizona_android:push_event(~"inc")}], [~"+"]}
Summary
Functions
Navigates the client to the server route Path.
Navigates to Path with options.
Pushes a named event to the server.
Pushes a named event with an explicit payload.
Functions
-spec push_event(Event) -> arizona_effect:cmd() when Event :: binary().
Pushes a named event to the server.
-spec push_event(Event, Payload) -> arizona_effect:cmd() when Event :: binary(), Payload :: map().
Pushes a named event with an explicit payload.