项目作者: alttch

项目描述 :
Universal, customizable android app template for web-based interfaces
高级语言: Java
项目地址: git://github.com/alttch/evaHI.git
创建时间: 2019-02-12T18:23:14Z
项目社区:https://github.com/alttch/evaHI

开源协议:Apache License 2.0

下载


What is evaHI?

evaHI is Android application template which allow you to quickly build custom
Android app viewer for your mobile web application.


Interface example
Interface example

Why do I need this?

Of course, users can just open your web application via mobile web browser.

But evaHI provides additional features:

  • Your web-app will look as cool as any native Android app and your custom
    viewer app can be added to Google Play Store

  • You can hard-code connection parameters of your web-app or users can quickly
    configure it with QR codes

    Interface example

  • The app can automatically pass basic authentication forms

  • The app provides native navigation menu with custom icons and menu labels

  • Icons, menu labels and target URLs can be changed dynamically on your web-app
    server so users don’t need to download application updates again and again

  • The app can switch URLs depending is current device mode portrait or
    landscape

Looks cool. How can I build my own app?

Customize app source:

  • Download evaHI source (git clone https://github.com/alttch/evaHI)
  • Edit prepare.ini file
  • Run ./prepare -D
  • Build your app with Android Studio or other Android build tool

How can I customize launcher icons?

You may either place own icons to /app/src/main/res or use
—icon and —icon-round (both must be specified) options for prepare
script.

Create configuration file on your web server

  • Create .evahi directory in your web server http root

  • Put there the following configuration file. The file should be named
    config.yml, config.yaml or config.json (if JSON format is used)

  1. serial: 1
  2. index: /index.html
  3. index_landscape: /landscape.html
  4. home_icon: h.jpg
  5. menu:
  6. - {icon: pages/page1.png, name: Page 1, url: /page1.html}
  7. - {icon: pages/contacts.png, name: Contacts, url: /contacts.html}

All icons should be placed in /.evahi/icons/ dir and have relative paths in
app configuration.

The app caches configuration settings and icons, but reloads them if serial
field is increased.

Configuration QR codes

User can scan QR codes with settings to quickly configure the app. QR code
format is:

  1. scheme:https|address:yourserver.com|port:443|user:test|password:123

Fields user and password are optional.

Authentication

evaHI sends username/password only if basic authentication is set up. However,
your web application may detect evaHI client (checking HTTP User-Agent =
‘evaHI …’ header) and ask it to provide authentication credentials returning:

  1. HTTP/1.1 401 Unauthorized
  2. WWW-Authenticate: Basic realm="?"

The client will repeat HTTP request with authentication headers included.

Any examples?

Our EVA ICS Control Center Android app is fully
evaHI-based.

source: https://github.com/alttch/evacc/
app: https://play.google.com/store/apps/details?id=com.altertech.evacc