added query to new portal search intent
This commit is contained in:
parent
a208ba9083
commit
28da9e1746
@ -136,7 +136,7 @@ window.showPortalPosLinks = function(lat, lng, name) {
|
|||||||
portal_name = encodeURIComponent(' (' + name + ')');
|
portal_name = encodeURIComponent(' (' + name + ')');
|
||||||
}
|
}
|
||||||
if (typeof android !== 'undefined' && android && android.intentPosLink) {
|
if (typeof android !== 'undefined' && android && android.intentPosLink) {
|
||||||
android.intentPosLink(lat, lng);
|
android.intentPosLink(lat, lng, portal_name);
|
||||||
} else {
|
} else {
|
||||||
var qrcode = '<div id="qrcode"></div>';
|
var qrcode = '<div id="qrcode"></div>';
|
||||||
var script = '<script>$(\'#qrcode\').qrcode({text:\'GEO:'+lat+','+lng+'\'});</script>';
|
var script = '<script>$(\'#qrcode\').qrcode({text:\'GEO:'+lat+','+lng+'\'});</script>';
|
||||||
|
@ -20,9 +20,8 @@ public class IITC_JSInterface {
|
|||||||
|
|
||||||
// send geo intent for navigation apps like gmaps or waze etc...
|
// send geo intent for navigation apps like gmaps or waze etc...
|
||||||
@JavascriptInterface
|
@JavascriptInterface
|
||||||
public void intentPosLink(String lat, String lng) {
|
public void intentPosLink(String lat, String lng, String portal_name) {
|
||||||
// TODO eventually we want back our lat/lng-query? + "?q=" + lat + "," + lng;
|
String uri = "geo:" + lat + "," + lng + "?q=" + lat + "," + lng + portal_name;
|
||||||
String uri = "geo:" + lat + "," + lng;
|
|
||||||
Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
|
Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
|
||||||
Uri.parse(uri));
|
Uri.parse(uri));
|
||||||
context.startActivity(intent);
|
context.startActivity(intent);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user