2013-07-15 2 views
1

Phonegapp로 매우 간단한 웹 애플리케이션을 개발 중이며 사용자가 특정 버튼을 클릭 할 때 Play 스토어 APP (Android)를 열고 싶습니다. 나는 약간의 Q % A를 읽을 수 있지만 난 내가 이런 index.html을이 그것을 을 할 수있는 방법을 모른다 :PhoneGap으로 Play 스토어 열기

<!DOCTYPE html> 
<html> 
    <head> 
    <title>Just a development test ->dany_danay</title> 

    <link href="jquery-mobile/jquery.mobile-1.0a3.min.css" rel="stylesheet" type="text/css"/> 
    <script src="jquery-mobile/jquery-1.5.min.js" type="text/javascript"></script> 
    <script src="jquery-mobile/jquery.mobile-1.0a3.min.js" type="text/javascript"></script> 

    <script type="text/javascript" charset="utf-8" src="phonegap.js"></script> 
    <script type="text/javascript" charset="utf-8"> 
    var watchID = null; 
    var pictureSource; // Origen de la imagen 
    var destinationType; // Formato del valor retornado 

    // Espera a que PhoneGap conecte con el dispositivo. 
    // 
    document.addEventListener("deviceready",onDeviceReady,false); 

    function alertDismissed() { 
     // do something 
    } 




    </script> 
    </head> 
    <body> 


<div data-role="page" id="page"> 
    <div data-role="header"> 
     <h1>Your SmartPhone info</h1> 
    </div> 



    <center><a href="https://play.google.com/store/apps/details?id=com.tusmartphone.dany&feature=search_result#?t=W251bGwsMSwyLDEsImNvbS50dXNtYXJ0cGhvbmUuZGFueSJd" rel="external" /><img src="http://media.go2speed.org/brand/files/offermobi/1981/20130605194659-WARFAL_b01_320X50_04.png"/></a> 


    </center> 


    </body> 
</html> 
나는에 확인해 = "외부"또는 REL = "시스템"을 추가하는 시도

이것은 JS 기능 :

<script type="text/javascript"> 
$(function() { 
    updateAndroidMarketLinks(); 
    // some more core here ... 

    function updateAndroidMarketLinks() 
    { 
    var ua = navigator.userAgent.toLowerCase(); 
    if (0 <= ua.indexOf("android")) { 
     // we have android 
     $("a[href^='http://play.google.com/']").each(function() { 
     this.href = this.href.replace(/^http:\/\/play\.google\.com\//, 
      "market://"); 
     }); 
    } 
    } 
}); 
</script> 

나는 의도를 호출해야하지만, 난 HTML이나 JS ... 그나마 증명하는 방법을 알고이 할 수있는 방법을 잘 모르는이 : https://stackoverflow.com/questions/15325864/phonegap-android-open-play-store 나이 : How to Open Google Play store from Phonegaphttp://tannerburson.com/blog/2012/05/28/IntentChooser-my-first-PhoneGap-Cordova-plugin/

답변