Accessing firebase using cloud pebble (Pebble.js)

 ̄綄美尐妖づ 提交于 2019-12-12 06:12:51

问题


I've been trying to figure out a way to access data from firebase to display in a pebble app, using cloud pebble. I'm not quite sure how to do so as I'm relatively new to javascript and the pebble platform.


回答1:


You can require remote URI's using the following syntax:

require('//cdn.firebase.com/js/client/2.2.9/firebase.js');

The other (more traditional) way to work around this is to copy-paste the source code of the library you want to use at the top of your JavaScript file.

Your best bet to use Firebase for the Pebble is to use the C SDK. There are lots of great examples on how to do this. Here is one. https://github.com/tyhoff/clock



来源:https://stackoverflow.com/questions/29833443/accessing-firebase-using-cloud-pebble-pebble-js

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!