0

私はappceleratorを使ってWindows用の素晴らしいアプリを作成し、それをモバイル(android)に変換したいと思います。

問題は、デフォルトのランチャーが「index.html」であり、すべてのjavascript / css / htmlを混在させることができるウィンドウでアプリを作成するのとは異なり、モバイルのデフォルトのランチャーはapp.jsです。

私は次のことを試しました:

var webview = Titanium.UI.createWebView({
    url : 'index.html'
});

var window = Titanium.UI.createWindow();
window.add(webview);
window.open({modal:true});

これはうまく機能しますが、index.html内で使用しているAPIはどれも実行されておらず、エラー(未定義)を警告するだけです。

誰かがこの問題を修正する方法を知っていますか?

編集:アプリで使用しているAPIは2つだけです:

var db = Titanium.Database.open('app_data');
var device_id = Titanium.Platform.id;
4

1 に答える 1

0

you dont have access to all of the API from the webview, see link below

http://developer.appcelerator.com/question/8991/webview-usage-guideline

you will need to do most of your business logic in the js files and through the event mechanisms move data from you app to the ui level

于 2010-10-31T19:12:00.113 に答える