Giter Club home page Giter Club logo

android-webapp's Introduction

Android WebApp

Run RESTEasy endpoints (annnotated by JAX-RS) at Android enviroment. We are intercepting Web-view (browser) requests, dispatching it to the endpoints. So there is no need for application server.

How is it possible?

Android 5.1 web-view has support for intercepting request, but only for GET requests. We bring ApiClient (javascript Ajax wrapper) for intercepting POST requests. POST requests are submitted by WebAppInterface, serialized by JacksonXML and handled again in endpoint.

Custom interceptors

  • AjaxProxyInterceptor - intercept Ajax requests for non-localhost target
  • CustomCacheResolver - intercept and cache request's body (useful for images)
  • LoadStaticResources - intercept and redirect request to Android assets (useful for static files in webdir)
  • ServerOriginInterceptor - intercept and redirect local request to RESTEasy dispatcher

RESTEasy providers

HtmlBodyProvider - provider for HTML annotated endpoint, loads HTML file from assets dir JsonBodyProvider - serialize/deserialize method parameters from request body QueryParamInjector - serialize/deserialize method parameters from request get parameters

JAX-RS support

REST endpoints can be annotatted with any annotation. But, there is standard JAX-RS. We import implementation from RESTEasy.

Custom session

To simulate user's session at Adnroid Backend we implement JsonFileStorage and MemoryStorage.

Preloader

There is native preloader. It is visible until everything (Web-View, Android BE, custom initializations) is prepared and loaded.

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.