add action for downloads menu item
This commit is contained in:
parent
466ba93750
commit
239ef1c238
3 changed files with 4 additions and 14 deletions
|
@ -126,23 +126,12 @@
|
||||||
android:theme="@android:style/Theme.NoDisplay" />
|
android:theme="@android:style/Theme.NoDisplay" />
|
||||||
<activity android:name=".ErrorActivity"/>
|
<activity android:name=".ErrorActivity"/>
|
||||||
|
|
||||||
|
<!-- giga get related -->
|
||||||
<activity
|
<activity
|
||||||
android:name=".download.MainActivity"
|
android:name=".download.MainActivity"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:theme="@style/AppTheme"
|
android:theme="@style/AppTheme"
|
||||||
android:launchMode="singleTask">
|
android:launchMode="singleTask">
|
||||||
<intent-filter>
|
|
||||||
<action android:name="us.shandian.giga.intent.DOWNLOAD"/>
|
|
||||||
<category android:name="android.intent.category.DEFAULT"/>
|
|
||||||
<data
|
|
||||||
android:mimeType="application/*"
|
|
||||||
android:host="*"
|
|
||||||
android:scheme="http"/>
|
|
||||||
<data
|
|
||||||
android:mimeType="application/*"
|
|
||||||
android:host="*"
|
|
||||||
android:scheme="https"/>
|
|
||||||
</intent-filter>
|
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
<service
|
<service
|
||||||
|
|
|
@ -368,7 +368,8 @@ public class VideoItemListActivity extends AppCompatActivity
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case R.id.action_show_downloads: {
|
case R.id.action_show_downloads: {
|
||||||
//todo: implement this
|
Intent intent = new Intent(this, org.schabi.newpipe.download.MainActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -115,7 +115,7 @@ public class MainActivity extends AppCompatActivity implements AdapterView.OnIte
|
||||||
});
|
});
|
||||||
|
|
||||||
// Intent
|
// Intent
|
||||||
if (getIntent().getAction().equals(INTENT_DOWNLOAD)) {
|
if (getIntent().getAction() != null && getIntent().getAction().equals(INTENT_DOWNLOAD)) {
|
||||||
mPendingUrl = getIntent().getData().toString();
|
mPendingUrl = getIntent().getData().toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue