Add support for fdroid://details?id=app.id uris
Also, launch them from inside AppDetails directly
This commit is contained in:
parent
1764ceb55a
commit
234b39acb7
@ -38,13 +38,6 @@
|
|||||||
|
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
<intent-filter>
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
|
||||||
|
|
||||||
<action android:name="android.intent.action.VIEW" />
|
|
||||||
|
|
||||||
<data android:scheme="market" android:host="details" />
|
|
||||||
</intent-filter>
|
|
||||||
|
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="android.app.default_searchable"
|
android:name="android.app.default_searchable"
|
||||||
@ -56,6 +49,7 @@
|
|||||||
android:name="AppDetails"
|
android:name="AppDetails"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:parentActivityName="FDroid" >
|
android:parentActivityName="FDroid" >
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
|
||||||
@ -63,6 +57,21 @@
|
|||||||
|
|
||||||
<data android:scheme="fdroid.app" />
|
<data android:scheme="fdroid.app" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
<intent-filter>
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
|
||||||
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
|
||||||
|
<data android:scheme="market" android:host="details" />
|
||||||
|
</intent-filter>
|
||||||
|
|
||||||
|
<intent-filter>
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
|
||||||
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
|
||||||
|
<data android:scheme="fdroid" android:host="details" />
|
||||||
|
</intent-filter>
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="android.support.PARENT_ACTIVITY"
|
android:name="android.support.PARENT_ACTIVITY"
|
||||||
android:value="FDroid" />
|
android:value="FDroid" />
|
||||||
|
@ -192,7 +192,13 @@ public class AppDetails extends ListActivity {
|
|||||||
appid = "";
|
appid = "";
|
||||||
Uri data = getIntent().getData();
|
Uri data = getIntent().getData();
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
appid = data.getEncodedSchemeSpecificPart();
|
if (data.isHierarchical())
|
||||||
|
// fdroid://details?id=app.id
|
||||||
|
// market://details?id=app.id
|
||||||
|
appid = data.getQueryParameter("id");
|
||||||
|
else
|
||||||
|
// fdroid.app:app.id (old scheme)
|
||||||
|
appid = data.getEncodedSchemeSpecificPart();
|
||||||
Log.d("FDroid", "AppDetails launched from link, for '" + appid
|
Log.d("FDroid", "AppDetails launched from link, for '" + appid
|
||||||
+ "'");
|
+ "'");
|
||||||
} else if (!i.hasExtra("appid")) {
|
} else if (!i.hasExtra("appid")) {
|
||||||
|
@ -83,12 +83,7 @@ public class FDroid extends FragmentActivity {
|
|||||||
setDefaultKeyMode(DEFAULT_KEYS_SEARCH_LOCAL);
|
setDefaultKeyMode(DEFAULT_KEYS_SEARCH_LOCAL);
|
||||||
|
|
||||||
Intent i = getIntent();
|
Intent i = getIntent();
|
||||||
Uri data = i.getData();
|
if (i.hasExtra("uri")) {
|
||||||
if (data != null && data.getScheme().equals("market")) {
|
|
||||||
Intent call = new Intent(this, AppDetails.class);
|
|
||||||
call.putExtra("appid", data.getQueryParameter("id"));
|
|
||||||
startActivityForResult(call, REQUEST_APPDETAILS);
|
|
||||||
} else if (i.hasExtra("uri")) {
|
|
||||||
Intent call = new Intent(this, ManageRepo.class);
|
Intent call = new Intent(this, ManageRepo.class);
|
||||||
call.putExtra("uri", i.getStringExtra("uri"));
|
call.putExtra("uri", i.getStringExtra("uri"));
|
||||||
startActivityForResult(call, REQUEST_MANAGEREPOS);
|
startActivityForResult(call, REQUEST_MANAGEREPOS);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user