开发者

cross-platform (iPhone, Android etc.) mobile phone file download

I am trying to figure out how I could implement a cross-platform file download for mobile phones. Basically I would like to offer a HTML5/jScript ringtones-websites where the user could simply press a download/install button and the ringtone would be downloaded and installed.

It looks like I won't be able to achieve this with jScript/jScript Mobile only. I guess I will need native functions for accessing folders.

Can someone point me to the right direction please? Could PhoneGap or another framework help me? I just started to read about those frameworks, th开发者_如何学编程at's why I can't say if PhoneGap and friends could help me. Also it looks like there are many cross-platform frameworks, and I simply don't know which one is best because I never used one of those frameworks.

Any input is appreciated.

Milanko


WebView

Depending on your needs, you may even be able to use the built-in WebView object on Android, or UIWebView object on the iPhone. Windows Mobile has the WebBrowser class.

A WebView object is essentially just an in-app web browser. You provide a web page source, and it displays the exact same thing that your mobile device would display if you were using the dedicated mobile web browser instead of your own app. However, WebView offers a distinct advantage over the “pure browser” approach, because it allows interaction between the web page content and the native application code, to whatever degree you want to write code to support. The PhoneGap platform mentioned above makes heavy use of this. Even the official Gmail app from Google uses WebViews in some places. It can be a powerful tool if used correctly.

Usage

You could build your app with html/css/javascript/ajax/php if you use the WebView object. The sourcecode for the (php) download scripts can be found here:

  • http://www.tutorialchip.com/php-download-file-script/
  • http://www.zubrag.com/scripts/download.php


now you can use the native download api which packed within phonegap 1.3 oryou can use this plugin http://s.zah.me/yuOaGH which has been tested with phonegap 1.3 as the note says

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜