是否可以将Android PhoneGap和jQuery移动应用程序转换为HTML5缓存清单应用程序?

时间:2013-04-27 14:35:56

标签: android html5 flash cordova jquery-mobile

所以我正在使用PhoneGap和jQuery mobile来构建我的Android应用程序,但在我的应用程序中是不显示的flash swf电影我认为这与PhoneGap有关。然而,我想知道我是否尝试过HTML5清单缓存应用程序然后它可能会工作,它只是我不完全确定如何去做。我是否仍然可以将其导出为Android应用程序,如何将其作为应用程序在我的设备中呈现?我查看了http://www.youtube.com/watch?v=kXZA9eS6nCw和HTML5应用程序缓存医生等教程,但我仍然觉得很难理解我的应用程序。目前我使用xampp作为我的网络服务器。我不确定这是否是正确的方法,但这是我到目前为止所做的,我将它们全部放在服务器中的htdocs中。

的index.html

  <!DOCTYPE html> 
  <html lang="en" manifest="site.manifest">
  <head>
  <meta charset="utf-8">
  <title>HelloWorld App</title>
  <link href="jquery.mobile-1.0.min.css" rel="stylesheet" type="text/css"/>
  <script src="jquery-1.6.4.min.js" type="text/javascript"></script>
  <script src="jquery.mobile-1.0.min.js" type="text/javascript"></script>
  <link rel="stylesheet" href="see.css">

  </head> 
  <body>
   <!--background colour-->
  <img src="yaa/bluew.jpg" width="1048" height="800">

  <div data-role="page" id="page"data-role="page" data-theme="b">
  <!--header within the jQuery Mobile data colour theme page b for blue-->
  <div data-role="header">
          <h1><img src=yaa/header4.png alt="HelloWorld" width="529" height="178"200" />         </h1>
  </div>
      <div data-role="content"> 
        <ul data-role="listview">
          <p>
               <object width="710" height="493">
          <param name="movie" value="welcome.swf">
          <embed src="yaa/welcome.swf"
                 width="710" height="493"> </embed>
        </object>
          </p>
          <p> <button id="startButton" onclick ="location.href=    ('#page2');">Start</button> </p>
        </ul> 
      </div>
  <div data-role="footer">
          <h4>Welcome To HelloWorld</h4>
      </div>
  </div>

Site.Manifest     CACHE MANIFEST

# version 0.2

ind.html
jquery.mobile-1.0.min.css
jquery-1.6.4.min.js
jquery.mobile-1.0.min.js
see.css


"site.manifest" [New] 8L, 74C written
preview.png

的.htaccess

AddType text/cache-manifest manifest</p>

" .htaccess" [New] 1L, 37C written

这只是我的PhoneGap java代码

package com.helloapp.namespace.myhelloword;


import org.apache.cordova.DroidGap;

import android.os.Bundle;


public class MyPhoneGapActivity extends DroidGap {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.setIntegerProperty("splashscreen", R.drawable.splash);
super.loadUrl("file:///android_asset/www/index.html");



    }



}

如果我朝着正确的方向前进,请告诉我,因为我不太确定如何根据我提供的内容使用HTML5缓存。如果我完全无视java,请告诉我,谢谢。

0 个答案:

没有答案