parent
d22c714dbd
commit
53aa7ec849
@ -294,6 +294,19 @@
|
|||||||
<data android:host="www.f-droid.org" />
|
<data android:host="www.f-droid.org" />
|
||||||
<data android:pathPrefix="/app/" />
|
<data android:pathPrefix="/app/" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
|
|
||||||
|
<data android:scheme="http" />
|
||||||
|
<data android:scheme="https" />
|
||||||
|
<data android:host="play.google.com" /> <!-- they don't do www. -->
|
||||||
|
<data android:path="/store/apps/details" />
|
||||||
|
</intent-filter>
|
||||||
|
|
||||||
</activity>
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:label="@string/menu_preferences"
|
android:label="@string/menu_preferences"
|
||||||
|
@ -348,6 +348,7 @@ public class AppDetails extends ActionBarActivity implements ProgressListener, A
|
|||||||
* Various different intents could cause us to show this activity, such as:
|
* Various different intents could cause us to show this activity, such as:
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>market://details?id=[app_id]</li>
|
* <li>market://details?id=[app_id]</li>
|
||||||
|
* <li>https://play.google.com/store/apps/details?id=[app_id]</li>
|
||||||
* <li>https://f-droid.org/app/[app_id]</li>
|
* <li>https://f-droid.org/app/[app_id]</li>
|
||||||
* <li>fdroid.app:[app_id]</li>
|
* <li>fdroid.app:[app_id]</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
@ -362,8 +363,14 @@ public class AppDetails extends ActionBarActivity implements ProgressListener, A
|
|||||||
String appId = null;
|
String appId = null;
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
if (data.isHierarchical()) {
|
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
|
// market://details?id=app.id
|
||||||
|
// https://play.google.com/store/apps/details?id=app.id
|
||||||
appId = data.getQueryParameter("id");
|
appId = data.getQueryParameter("id");
|
||||||
} else {
|
} else {
|
||||||
// https://f-droid.org/app/app.id
|
// https://f-droid.org/app/app.id
|
||||||
|
Loading…
x
Reference in New Issue
Block a user