add custom session
This commit is contained in:
parent
1d1adffd55
commit
f377531dc0
@ -10,8 +10,8 @@ android {
|
||||
applicationId "it.purser.stream"
|
||||
minSdkVersion 25
|
||||
targetSdkVersion 29
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
versionCode 102
|
||||
versionName "102.0"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ import java.util.Locale;
|
||||
|
||||
public class ShareActivity extends Activity {
|
||||
private Uri getSharedLink() {
|
||||
HashSet<String> domains = new HashSet<String>();
|
||||
HashSet<String> domains = new HashSet<>();
|
||||
domains.add("youtu.be");
|
||||
|
||||
Intent intent = getIntent();
|
||||
@ -38,7 +38,11 @@ public class ShareActivity extends Activity {
|
||||
builder.path(uri.getPath());
|
||||
builder.appendQueryParameter("provider", "youtube");
|
||||
builder.appendQueryParameter("render", "true");
|
||||
builder.appendQueryParameter("cast", "true");
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user