简体   繁体   English

Nativescript应用程序无需使用服务器即可从本地浏览器接收数据

[英]Nativescript app to receive data from local browser without using a server

We have an angular web application that can go offline using service workers. 我们有一个有角度的Web应用程序,可以使用服务人员使它脱机。 Most of the time it's used offline than online. 在大多数情况下,它是离线使用的,而不是在线使用的。

To print a few info to a portable bluetooth printer (like a receipt), we've created a nativescript app that looks in the downloads folder for files downloaded from the web app. 为了将一些信息打印到便携式蓝牙打印机(如收据)上,我们创建了一个nativescript应用程序,该应用程序在downloads文件夹中查找从Web应用程序下载的文件。 (NB: At the moment we only intend to support android devices. Converting the web-app into nativescript is also out of the question due to time constraints) (注意:目前,我们仅打算支持android设备。由于时间限制,将网络应用转换为原生脚本也是不可能的)

This works but maybe it's not the best way to do it. 这行得通,但也许不是最好的方法。 We would like to know if it's possible to let our nativescript app listen for data from the browser without using an api server in between them. 我们想知道是否可以让我们的nativescript应用程序在浏览器之间不使用api服务器的情况下侦听来自浏览器的数据。

根据所存储的信息,你可以使用尺寸application-settings模块或一些本地数据库SQLite的一样( nativescript-sqlite的 ),甚至在本地存储与火力地堡实时数据库的信息(在和启用离线模式init所讨论这里

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从浏览器应用程序发布数据而无需编写自己的服务器 - Publish data from browser app without writing my own server 如何在服务器端(php)接收使用XMLHttpRequest从浏览器发送的数据? - How to receive data, sent from the browser using XMLHttpRequest, in server-side (php)? 以流方式从HTTP服务器接收Web浏览器中的二进制数据 - Receive binary data in web browser from HTTP server in a streaming style Websocket:浏览器似乎未从python服务器接收数据 - Websocket: Browser dosn't seem to receive data from python server 是否可以将数据从 JavaScript 浏览器应用程序直接发送到本地 python 服务器? - Is it possible to send data from a JavaScript browser app to a local python server directly? 如何接收从客户端应用程序传递到jsreport服务器的数据 - How to receive the data that is being passed from client app to the jsreport server 注销后如何在不使用浏览器缓存的情况下从服务器重新加载角度应用程序 - How to reload angular app from server, without using browser cache, after logout 如何在不使用任何 HTTP 服务器的情况下从本地文件 url ("file:///") 访问 react-app build? - How to access react-app build from local file url ("file:///"), without using any HTTP server? 在 React 中,是否可以避免在按下浏览器后退按钮时从服务器重新加载数据(不使用 Redux)? - In React is it possible to avoid reloading data from server upon pressing browser back button (without using Redux)? 如何使用AJAX从跨域服务器接收json数据? - How to receive json data from cross domain server using AJAX?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM