set up "Android App Links" handling aka "Digital Asset Links"
Add all the new URL path possibilities with the new website to the filter, and the possible, official host names. This makes it more likely that f-droid.org links go straight to F-Droid. * https://developers.google.com/digital-asset-links/v1/getting-started * https://developer.android.com/training/app-links/verify-site-associations.html fdroid-website#165
This commit is contained in:
parent
f748d1e5fc
commit
3938146f93
@ -301,7 +301,7 @@
|
||||
<data android:scheme="fdroid.app" />
|
||||
</intent-filter>
|
||||
|
||||
<intent-filter>
|
||||
<intent-filter android:autoVerify="true">
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
@ -311,20 +311,13 @@
|
||||
<data android:scheme="https" />
|
||||
<data android:host="f-droid.org" />
|
||||
<data android:host="www.f-droid.org" />
|
||||
<data android:host="staging.f-droid.org" />
|
||||
<data android:pathPrefix="/app/" />
|
||||
</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="f-droid.org" />
|
||||
<data android:host="www.f-droid.org" />
|
||||
<data android:pathPrefix="/packages/" />
|
||||
<data android:pathPrefix="/repository/browse" />
|
||||
<!-- support localized URLs -->
|
||||
<data android:pathPattern="/.*/packages/.*" />
|
||||
<data android:pathPattern="/.*/packages/.*/" />
|
||||
</intent-filter>
|
||||
|
||||
<intent-filter>
|
||||
|
@ -16,11 +16,9 @@ import android.support.v7.widget.RecyclerView;
|
||||
import android.text.TextUtils;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.ashokvarma.bottomnavigation.BadgeItem;
|
||||
import com.ashokvarma.bottomnavigation.BottomNavigationBar;
|
||||
import com.ashokvarma.bottomnavigation.BottomNavigationItem;
|
||||
|
||||
import org.fdroid.fdroid.AppDetails2;
|
||||
import org.fdroid.fdroid.AppUpdateStatusManager;
|
||||
import org.fdroid.fdroid.AppUpdateStatusManager.AppUpdateStatus;
|
||||
@ -226,19 +224,21 @@ public class MainActivity extends AppCompatActivity implements BottomNavigationB
|
||||
}
|
||||
switch (host) {
|
||||
case "f-droid.org":
|
||||
if (path.startsWith("/repository/browse")) {
|
||||
case "www.f-droid.org":
|
||||
case "staging.f-droid.org":
|
||||
if (path.startsWith("/app/") || path.startsWith("/packages/")
|
||||
|| path.matches("^/[a-z][a-z][a-zA-Z_-]*/packages/.*")) {
|
||||
// http://f-droid.org/app/packageName
|
||||
packageName = data.getLastPathSegment();
|
||||
} else if (path.startsWith("/repository/browse")) {
|
||||
// http://f-droid.org/repository/browse?fdfilter=search+query
|
||||
query = UriCompat.getQueryParameter(data, "fdfilter");
|
||||
|
||||
// http://f-droid.org/repository/browse?fdid=packageName
|
||||
packageName = UriCompat.getQueryParameter(data, "fdid");
|
||||
} else if (path.startsWith("/app")) {
|
||||
// http://f-droid.org/app/packageName
|
||||
packageName = data.getLastPathSegment();
|
||||
if ("app".equals(packageName)) {
|
||||
} else if ("/app".equals(data.getPath()) || "/packages".equals(data.getPath())) {
|
||||
packageName = null;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "details":
|
||||
// market://details?id=app.id
|
||||
|
Loading…
x
Reference in New Issue
Block a user