Pass title from JavaScript
This commit is contained in:
		| @@ -176,7 +176,7 @@ window.showPortalPosLinks = function(lat, lng, name) { | ||||
|   } | ||||
|  | ||||
|   if (typeof android !== 'undefined' && android && android.intentPosLink) { | ||||
|     android.intentPosLink(lat, lng, map.getZoom(), name); | ||||
|     android.intentPosLink(lat, lng, map.getZoom(), name, true); | ||||
|   } else { | ||||
|     var qrcode = '<div id="qrcode"></div>'; | ||||
|     var script = '<script>$(\'#qrcode\').qrcode({text:\'GEO:'+lat+','+lng+'\'});</script>'; | ||||
| @@ -205,7 +205,7 @@ window.androidPermalink = function() { | ||||
|     return true; // i.e. execute other actions | ||||
|    | ||||
|   var center = map.getCenter(); | ||||
|   android.intentPosLink(center.lat, center.lng, map.getZoom(), null); | ||||
|   android.intentPosLink(center.lat, center.lng, map.getZoom(), "Intel Map", false); | ||||
|   return false; | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -38,12 +38,13 @@ public class IITC_JSInterface { | ||||
|  | ||||
|     // open dialog to send geo intent for navigation apps like gmaps or waze etc... | ||||
|     @JavascriptInterface | ||||
|     public void intentPosLink(double lat, double lng, int zoom, String portalName) { | ||||
|     public void intentPosLink(double lat, double lng, int zoom, String title, boolean isPortal) { | ||||
|         Intent intent = new Intent(context, ShareActivity.class); | ||||
|         intent.putExtra("lat", lat); | ||||
|         intent.putExtra("lng", lng); | ||||
|         intent.putExtra("zoom", zoom); | ||||
|         intent.putExtra("title", portalName); | ||||
|         intent.putExtra("title", title); | ||||
|         intent.putExtra("isPortal", isPortal); | ||||
|         context.startActivity(intent); | ||||
|     } | ||||
|  | ||||
|   | ||||
| @@ -63,11 +63,7 @@ public class ShareActivity extends FragmentActivity implements ActionBar.TabList | ||||
|         mTitle = intent.getStringExtra("title"); | ||||
|         mLl = intent.getDoubleExtra("lat", 0) + "," + intent.getDoubleExtra("lng", 0); | ||||
|         mZoom = intent.getIntExtra("zoom", 0); | ||||
|  | ||||
|         if (mTitle == null) { | ||||
|             mTitle = "Intel Map"; | ||||
|             mIsPortal = false; | ||||
|         } | ||||
|         mIsPortal = intent.getBooleanExtra("isPortal", false); | ||||
|  | ||||
|         final ActionBar actionBar = getActionBar(); | ||||
|         actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user