我正在嘗試使用Meteor。現在我已經將整個安裝程序在apache2的本地機器上運行,並且從Android模擬器的瀏覽器瀏覽相同的URL時,meteor.js也可以工作。現在主要的問題是我需要從我的android應用程序的本地URL的功能,在這裏頁面無法加載遠程js。我加載使用網頁視圖使用loadURL方法設置的JavaScript後,下面的HTML作爲啓用.The JS嵌入在HTML將是這樣的在android中的本地Html文件中加載流星.js
<script type="text/javascript" src="http://meteor.mywebserver.com/meteor.js"></script>
<script type="text/javascript">
window.onload = function()
{
Meteor.host = "meteor.mywebserver.com";
alert(textStatus);
// Call the test() function when data arrives
Meteor.registerEventCallback("process", commentsUpdate);
// Join the demo channel and get last five events, then stream
Meteor.joinChannel("demo", 0);
Meteor.mode = 'longpoll';
// Start streaming!
Meteor.connect();
// Handle incoming events
function commentsUpdate(data)
{
alert(data);
};});
周圍有很多我想這stackoverflow answer
爲了不經過搜索有用。任何人都可以幫我找到工作,我不能使用當地的meteor.js,因爲它不會工作。
感謝
** meteor.js **是爲了運行在服務器上,而不是在客戶端上,我認爲... –