From 53aa7ec8492c43eca35f325fa0a4efb9e54fd8ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Mon, 30 Mar 2015 18:07:03 +0200 Subject: [PATCH] Add support for play.google.com app links As requested in #154 --- F-Droid/AndroidManifest.xml | 13 +++++++++++++ F-Droid/src/org/fdroid/fdroid/AppDetails.java | 9 ++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/F-Droid/AndroidManifest.xml b/F-Droid/AndroidManifest.xml index b67bf760e..0328b2839 100644 --- a/F-Droid/AndroidManifest.xml +++ b/F-Droid/AndroidManifest.xml @@ -294,6 +294,19 @@ + + + + + + + + + + + + + *
  • market://details?id=[app_id]
  • + *
  • https://play.google.com/store/apps/details?id=[app_id]
  • *
  • https://f-droid.org/app/[app_id]
  • *
  • fdroid.app:[app_id]
  • * @@ -362,8 +363,14 @@ public class AppDetails extends ActionBarActivity implements ProgressListener, A String appId = null; if (data != null) { if (data.isHierarchical()) { - if (data.getHost() != null && data.getHost().equals("details")) { + final String host = data.getHost(); + if (host == null) { + Log.e(TAG, "Null host found in app link!"); + return null; + } + if (host.equals("details") || host.equals("play.google.com")) { // market://details?id=app.id + // https://play.google.com/store/apps/details?id=app.id appId = data.getQueryParameter("id"); } else { // https://f-droid.org/app/app.id