• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

RinteRface/shinyMobile: shiny API for Framework7 (IOS/android)

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

RinteRface/shinyMobile

开源软件地址(OpenSource Url):

https://github.com/RinteRface/shinyMobile

开源编程语言(OpenSource Language):

R 71.1%

开源软件介绍(OpenSource Introduction):

shinyMobile

Develop outstanding {shiny} apps for iOS, Android, desktop as well as beautiful {shiny} gadgets. {shinyMobile} is built on top of the latest Framework7 template.

R build status lifecycle CRAN status

Installation

# from CRAN
install.packages("shinyMobile")
# for the latest version
devtools::install_github("RinteRface/shinyMobile")

Cheatsheet

Demo

A running demo is available here : https://dgranjon.shinyapps.io/miniUI2Demo/. Left side: android demo, right side: iOS demo.

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() if allowPWA is TRUE (it leverages the Google PWA compatibility script).

To setup the necessary assets for your PWA, you may run:

remotes::install_github("RinteRface/charpente")
library(charpente)
set_pwa(APP_PATH, ...)

where APP_PATH is the app location. It only works if the app is inside a package like with {golem}. Alternatively, you may copy the www folder of the gallery app, which provides:

  • A valid service worker.
  • A valid offline.html fallback.
  • A valid web manifest. Don't forget to change the start_url property to the path of your app. For instance, the following app hosted at https://dgranjon.shinyapps.io/rstudio-global-2021-calendar/, has the /rstudio-global-2021-calendar/ path.
  • A valid set of icons. There are tools such as appsco and app-manifest, to create those custom icons and splash screens, if you need to.

It is really easier with {charpente}, the reason why we strongly recommend to develop your app inside a package.

Add the PWA to your desktop Apps

Copy the url of your app in your mobile web browser (iOS: Safari and Andoid: Chrome). In this example this is: https://dgranjon.shinyapps.io/miniUI2Demo/. It opens like a classic web app, with top and bottom ugly navigation bars.

  • Select the share button located in the bottom bar of your Iphone/Ipad. For Android, you may do something similar. Importantly, Chrome for iOS does not support this feature, that's why I recommend using Safari.
  • Click on "Add to Home Screen"
  • Choose a relevant name and click on OK.
  • The app will be added to your IOS/Android Apps. In case you want custom icons, replace the content of the www folder with your own.

Limitations

It is actually quite complex to guarantee that all mobile platforms are supported. The PWA compatibility script will work in most of the case. If not, please open an issue here, to help improving it!

Acknowledgement

A special thanks to Vladimir Kharlampidi for creating this amazing framework7 HTML template.

Code of Conduct

Please note that the shinyMobile project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
dotnet/runtime: .NET is a cross-platform runtime for cloud, mobile, desktop, and ...发布时间:2022-08-30
下一篇:
polinema-mobile/2019-mobile03发布时间:2022-08-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap