From 95b712620ef322fa8a627687ed549d4bf586d2f1 Mon Sep 17 00:00:00 2001 From: PavelRatushny Date: Fri, 28 Jul 2017 14:52:04 +0300 Subject: [PATCH] Change search to page in google play --- OsmAnd/src/net/osmand/plus/Version.java | 2 +- OsmAnd/src/net/osmand/plus/download/DownloadIndexesThread.java | 2 +- OsmAnd/src/net/osmand/plus/mapillary/MapillaryPlugin.java | 2 +- .../core/samples/android/sample1/InstallOsmandAppDialog.java | 2 +- .../src/net/osmand/nautical/NauticalActivity.java | 2 +- .../src/net/osmand/parkingPlugin/ParkingPluginActivity.java | 2 +- .../src/net/osmand/srtmPlugin/SRTMPluginActivity.java | 2 +- .../Osmand-Skimaps/src/net/osmand/skimaps/SkiMapsActivity.java | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/Version.java b/OsmAnd/src/net/osmand/plus/Version.java index b7408d5f5a..adfc89ce78 100644 --- a/OsmAnd/src/net/osmand/plus/Version.java +++ b/OsmAnd/src/net/osmand/plus/Version.java @@ -31,7 +31,7 @@ public class Version { if (isAmazonEnabled(ctx)) { return "amzn://apps/android?p="; } else if (isGooglePlayEnabled(ctx)) { - return "market://search?q=pname:"; + return "market://details?id="; } return "https://osmand.net/apps?id="; } diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadIndexesThread.java b/OsmAnd/src/net/osmand/plus/download/DownloadIndexesThread.java index 4e2c3013a0..9c428db783 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadIndexesThread.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadIndexesThread.java @@ -381,7 +381,7 @@ public class DownloadIndexesThread { builder.setPositiveButton(R.string.button_upgrade_osmandplus, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { - Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://search?q=pname:net.osmand.plus")); + Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=net.osmand.plus")); try { ctx.startActivity(intent); } catch (ActivityNotFoundException e) { diff --git a/OsmAnd/src/net/osmand/plus/mapillary/MapillaryPlugin.java b/OsmAnd/src/net/osmand/plus/mapillary/MapillaryPlugin.java index 1eb7d18913..e65ccaf8d2 100644 --- a/OsmAnd/src/net/osmand/plus/mapillary/MapillaryPlugin.java +++ b/OsmAnd/src/net/osmand/plus/mapillary/MapillaryPlugin.java @@ -236,7 +236,7 @@ public class MapillaryPlugin extends OsmandPlugin { } public static boolean installMapillary(OsmandApplication app) { - boolean success = execInstall(app, "market://search?q=pname:" + MAPILLARY_PACKAGE_ID); + boolean success = execInstall(app, "market://details?id=" + MAPILLARY_PACKAGE_ID); if (!success) { success = execInstall(app, "https://play.google.com/store/apps/details?id=" + MAPILLARY_PACKAGE_ID); } diff --git a/OsmAndCore-sample/src/net/osmand/core/samples/android/sample1/InstallOsmandAppDialog.java b/OsmAndCore-sample/src/net/osmand/core/samples/android/sample1/InstallOsmandAppDialog.java index 8081f1c0a4..f45c263a13 100644 --- a/OsmAndCore-sample/src/net/osmand/core/samples/android/sample1/InstallOsmandAppDialog.java +++ b/OsmAndCore-sample/src/net/osmand/core/samples/android/sample1/InstallOsmandAppDialog.java @@ -39,7 +39,7 @@ public class InstallOsmandAppDialog extends AppCompatDialogFragment { view.findViewById(R.id.install_osmand_btn).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - boolean success = execOsmAndInstall("market://search?q=pname:"); + boolean success = execOsmAndInstall("market://details?id="); if (!success) { success = execOsmAndInstall("https://play.google.com/store/apps/details?id="); } diff --git a/plugins/Osmand-Nautical/src/net/osmand/nautical/NauticalActivity.java b/plugins/Osmand-Nautical/src/net/osmand/nautical/NauticalActivity.java index ed01e7efee..c89c7fca37 100644 --- a/plugins/Osmand-Nautical/src/net/osmand/nautical/NauticalActivity.java +++ b/plugins/Osmand-Nautical/src/net/osmand/nautical/NauticalActivity.java @@ -57,7 +57,7 @@ public class NauticalActivity extends Activity { public void onClick(View v) { String appName = OSMAND_COMPONENT; logEvent(NauticalActivity.this, "open_play_store_" + appName); - Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://search?q=pname:" + appName)); + Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appName)); try { //stopService(intent); startActivity(intent); diff --git a/plugins/Osmand-ParkingPlugin/src/net/osmand/parkingPlugin/ParkingPluginActivity.java b/plugins/Osmand-ParkingPlugin/src/net/osmand/parkingPlugin/ParkingPluginActivity.java index e83c802fda..7748a9f5ce 100644 --- a/plugins/Osmand-ParkingPlugin/src/net/osmand/parkingPlugin/ParkingPluginActivity.java +++ b/plugins/Osmand-ParkingPlugin/src/net/osmand/parkingPlugin/ParkingPluginActivity.java @@ -56,7 +56,7 @@ public class ParkingPluginActivity extends Activity { public void onClick(View v) { String appName = OSMAND_COMPONENT; logEvent(ParkingPluginActivity.this, "open_play_store_" + appName); - Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://search?q=pname:" + appName)); + Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appName)); try { //stopService(intent); startActivity(intent); diff --git a/plugins/Osmand-SRTMPlugin/src/net/osmand/srtmPlugin/SRTMPluginActivity.java b/plugins/Osmand-SRTMPlugin/src/net/osmand/srtmPlugin/SRTMPluginActivity.java index 92421706d1..9b4bec7bf6 100644 --- a/plugins/Osmand-SRTMPlugin/src/net/osmand/srtmPlugin/SRTMPluginActivity.java +++ b/plugins/Osmand-SRTMPlugin/src/net/osmand/srtmPlugin/SRTMPluginActivity.java @@ -58,7 +58,7 @@ public class SRTMPluginActivity extends Activity { public void onClick(View v) { String appName = OSMAND_COMPONENT; logEvent(SRTMPluginActivity.this, "open_play_store_" + appName); - Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://search?q=pname:" + appName)); + Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appName)); try { //stopService(intent); startActivity(intent); diff --git a/plugins/Osmand-Skimaps/src/net/osmand/skimaps/SkiMapsActivity.java b/plugins/Osmand-Skimaps/src/net/osmand/skimaps/SkiMapsActivity.java index 1f8f3d5b13..30b849d59d 100644 --- a/plugins/Osmand-Skimaps/src/net/osmand/skimaps/SkiMapsActivity.java +++ b/plugins/Osmand-Skimaps/src/net/osmand/skimaps/SkiMapsActivity.java @@ -59,7 +59,7 @@ public class SkiMapsActivity extends Activity { public void onClick(View v) { String appName = OSMAND_COMPONENT; logEvent(SkiMapsActivity.this, "open_play_store_" + appName); - Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://search?q=pname:" + appName)); + Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appName)); try { //stopService(intent); startActivity(intent);