add custom session

This commit is contained in:
Roy Olav Purser 2021-05-19 00:51:47 +02:00
parent 1d1adffd55
commit f377531dc0
Signed by: roypur
GPG Key ID: E14D26A036F21656
2 changed files with 7 additions and 3 deletions

View File

@ -10,8 +10,8 @@ android {
applicationId "it.purser.stream" applicationId "it.purser.stream"
minSdkVersion 25 minSdkVersion 25
targetSdkVersion 29 targetSdkVersion 29
versionCode 1 versionCode 102
versionName "1.0" versionName "102.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }

View File

@ -9,7 +9,7 @@ import java.util.Locale;
public class ShareActivity extends Activity { public class ShareActivity extends Activity {
private Uri getSharedLink() { private Uri getSharedLink() {
HashSet<String> domains = new HashSet<String>(); HashSet<String> domains = new HashSet<>();
domains.add("youtu.be"); domains.add("youtu.be");
Intent intent = getIntent(); Intent intent = getIntent();
@ -38,7 +38,11 @@ public class ShareActivity extends Activity {
builder.path(uri.getPath()); builder.path(uri.getPath());
builder.appendQueryParameter("provider", "youtube"); builder.appendQueryParameter("provider", "youtube");
builder.appendQueryParameter("render", "true"); builder.appendQueryParameter("render", "true");
builder.appendQueryParameter("cast", "true");
Intent launch = new Intent(Intent.ACTION_VIEW, builder.build()); Intent launch = new Intent(Intent.ACTION_VIEW, builder.build());
launch.setPackage("com.android.chrome");
launch.putExtra("android.support.customtabs.extra.SESSION", "Proxy Stream");
launch.putExtra("android.support.customtabs.extra.TOOLBAR_COLOR", 0xff0000);
startActivity(launch); startActivity(launch);
} }
} }