Giter Site home page Giter Site logo

webert6 / shinymobile Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rinterface/shinymobile

0.0 0.0 0.0 30.83 MB

shiny API for Framework7 (IOS/android)

Home Page: https://rinterface.github.io/shinyMobile/

R 86.64% CSS 1.17% JavaScript 12.19%

shinymobile's Introduction

shinyMobile

Build Status AppVeyor build status lifecycle Project Status CRAN status

shiny API for Framework7 (IOS/android)

Installation

# for the latest version
devtools::install_github("RinteRface/shinyMobile")

Demo

A running demo is on shinyapps.io. Left side: android demo, right side: iOS demo

<iframe width="100%" src="https://dgranjon.shinyapps.io/miniUI2DemoMd" allowfullscreen="" frameborder="0" scrolling="no" height="822px"></iframe>
<iframe width="100%" src="https://dgranjon.shinyapps.io/miniUI2Demo" allowfullscreen="" frameborder="0" scrolling="no" height="710px"></iframe>

Progressive Web App (PWA)

Configuration

shinyMobile is PWA capable, meaning that it can be displayed full screen on many mobile devices. This feature is automatically handled by f7Page():

shiny::tags$meta(name = "apple-mobile-web-app-capable", content = "yes"),
shiny::tags$meta(name = "theme-color", content = "#2196f3"),
shiny::tags$meta(name = "apple-mobile-web-app-status-bar-style", content="black-translucent"),
shiny::tags$link(rel = "apple-touch-icon", href = "icons/apple-touch-icon.png"),
shiny::tags$link(rel = "icon", href = "icons/favicon.png"),
shiny::tags$link(rel = "manifest", href = "manifest.json"),

However to access launch icons and splatch screens, you must create a manifest.json file and an icon asset folder in the www folder of your app: more here.

The manifest.json file could be like:

{
  "name": "My App",
  "short_name": "My App",
  "description": "My App",
  "lang": "en-US",
  "start_url": "https://dgranjon.shinyapps.io/miniUI2Demo/",
  "display": "standalone",
  "icons": [
    {
      "src": "icons/128x128.png",
      "sizes": "128x128",
      "type": "image/png"
    },
    {
      "src": "icons/144x144.png",
      "sizes": "144x144",
      "type": "image/png"
    },
    {
      "src": "icons/152x152.png",
      "sizes": "152x152",
      "type": "image/png"
    },
    {
      "src": "icons/192x192.png",
      "sizes": "192x192",
      "type": "image/png"
    },
    {
      "src": "icons/256x256.png",
      "sizes": "256x256",
      "type": "image/png"
    },
    {
      "src": "icons/512x512.png",
      "sizes": "512x512",
      "type": "image/png"
    }
  ]
}

Be sure to replace the start_url with your own url. Add also a custom name, even though this can be modified later when adding the PWA to your IOS apps.

Later, there will be a dedicated function that will create the manifest.json file as well as other necessary assets.

Add the PWA to your desktop Apps

Go to the url of your app. In this example this is: https://dgranjon.shinyapps.io/miniUI2Demo/. It opens like a classic web app.

  • Select the share button located in the bottom bar of your Iphone/Ipad.
  • Click on "Add to Home Screen"
  • Choose a relevant name and click on OK.
  • The app will be added to your IOS Apps. In case you want custom icons, replace the content of the www folder with your own.

shinymobile's People

Contributors

divadnojnarg avatar irudolf16 avatar pvictor avatar johncoene avatar

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.