2015-06-16 56 views
-2

我想創建一個手機應用程序。在iOS中,我的應用程序正常工作。但在Android中,我的應用的第一頁不適用於應用,它始終啓動系統瀏覽器。如何在phonegap android應用程序中顯示我的應用程序的第一頁?

https://www.youtube.com/watch?v=ix2M7XdRN7c&feature=youtu.be&t=4m12s

的index.html

<html> 

<head> 
    <META HTTP-EQUIV="refresh" CONTENT="0; url=http://www.google.com/"> 

    <meta charset="utf-8" /> 
    <meta name="format-detection" content="telephone=no" /> 
    <meta name="msapplication-tap-highlight" content="no" /> 
    <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" /> 
    <link rel="stylesheet" type="text/css" href="css/index.css" /> 
    <title>title</title> 
</head> 

<body> 
    <script type="text/javascript"> 
     window.location.href = "http://www.google.com" 
    </script> 

    <a href="http://www.google.com">test link</a> 
</body> 

</html> 

我嘗試過很多辦法進行修復。 ex)使用'元標記','window.location.replace'和'window.location.href'...

但我的應用程序仍然只是在Android平臺上啓動系統瀏覽器。

請讓我知道,我怎樣才能顯示我的第一頁,而無需啓動系統瀏覽器。

+3

分享您的代碼 –

+0

你的意思是像在應用程序的瀏覽器? https://github.com/apache/cordova-plugin-inappbrowser這個問題需要更多的信息。 – laughingpine

回答

1

你試過改變config.xml嗎?

<content src="index.html" />

+0

是的...我的config.xml有''... –

+0

好吧,但您嘗試更改其他示例文件:「main.html」這不能解決您的問題? –

+0

我只有一頁。(index.html) –

相關問題