File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
packages/tizen_app_control Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 22
33* Update minimum Flutter and Dart version to 3.13 and 3.1.
44* Update code format.
5+ * Add YouTube app launch to the example.
56
67## 0.2.3
78
Original file line number Diff line number Diff line change @@ -89,6 +89,19 @@ class _MyAppState extends State<MyApp> {
8989 _localPort? .unregister ();
9090 }
9191
92+ Future <void > _launchYoutube () async {
93+ const String videoId = 'N7J4hdrvsZA' ;
94+ final AppControl request = AppControl (
95+ appId: 'com.samsung.tv.cobalt-yt' ,
96+ operation: 'http://tizen.org/appcontrol/operation/default' ,
97+ extraData: < String , dynamic > {
98+ 'PAYLOAD' : '#watch?v=$videoId &launch=launcher' ,
99+ },
100+ );
101+
102+ await request.sendLaunchRequest ();
103+ }
104+
92105 Future <void > _sendSms () async {
93106 final AppControl request = AppControl (
94107 operation: 'http://tizen.org/appcontrol/operation/share_text' ,
@@ -183,6 +196,11 @@ class _MyAppState extends State<MyApp> {
183196 child: Column (
184197 mainAxisSize: MainAxisSize .min,
185198 children: < Widget > [
199+ ElevatedButton (
200+ onPressed: _launchYoutube,
201+ child: const Text ('Launch Youtube App (Only TV)' ),
202+ ),
203+ const SizedBox (height: 10 ),
186204 ElevatedButton (
187205 onPressed: _sendSms,
188206 child: const Text ('Send SMS (No TV)' ),
You can’t perform that action at this time.
0 commit comments