Note that there are some explanatory texts on larger screens.

plurals
  1. POphonegap geo uri association
    primarykey
    data
    text
    <p>I am developing a phonegap application using phonegap build (therefore ALL in pure js and html, no native languages).</p> <p>In my page, i have some geo uri links (<a href="http://en.wikipedia.org/wiki/Geo_URI" rel="nofollow">http://en.wikipedia.org/wiki/Geo_URI</a> ) that are cliccable (they represent coordinates of markers in a map).</p> <p>Now, if the mobile device has installed and associated with this type of files an app (usually a gps navigator or the like), they open and launch the associated application as they should.</p> <p>My issue is that I don't want to show the clickable link (the button appears in the infowdindow of the marker) if the device has no app capable to open them.</p> <p>In native android code, you have the query-intent command for this. Does anyone know how to verify this in pure phonegap js?</p> <p>Ty!</p> <p>D.</p> <p>I have been asked for code: The only code that is relevant here is the following, which computes the html code to embed in the infowindow of the marker:</p> <pre><code> var computePathString=&lt;a href='geo:"+area['marker']['position'].lat()+", "+area['marker']['position'].lng()+"'&gt;Route&lt;/a&gt;; </code></pre> <p>Which translates to the following html:</p> <pre><code> &lt;a href='geo:45.557,9.1523'&gt;Route&lt;/a&gt; </code></pre> <p>Which works great on click IFF the device has an associated app (usually a gps navigator), but else does nothing on click. I need to achieve something similar to the query intents of android:</p> <pre><code> PackageManager packageManager = getPackageManager(); List&lt;ResolveInfo&gt; activities = packageManager.queryIntentActivities(intent, 0); boolean isIntentSafe = activities.size() &gt; 0; </code></pre> <p>only, in native phonegap js.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload