Add support for market://details?id=package.name
This commit is contained in:
parent
5a461589a5
commit
71e6c294e4
@ -37,6 +37,13 @@
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</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
|
||||
android:name="android.app.default_searchable"
|
||||
|
@ -83,7 +83,12 @@ public class FDroid extends FragmentActivity {
|
||||
setDefaultKeyMode(DEFAULT_KEYS_SEARCH_LOCAL);
|
||||
|
||||
Intent i = getIntent();
|
||||
if (i.hasExtra("uri")) {
|
||||
Uri data = i.getData();
|
||||
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);
|
||||
call.putExtra("uri", i.getStringExtra("uri"));
|
||||
startActivityForResult(call, REQUEST_MANAGEREPOS);
|
||||
|
Loading…
x
Reference in New Issue
Block a user