-
Notifications
You must be signed in to change notification settings - Fork 148
Tizen Support #104
base: main
Are you sure you want to change the base?
Tizen Support #104
Conversation
@@ -0,0 +1,7 @@ | |||
# Setup Tizen Environment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me comment on this. (May be this speech should be included later as a documentation section)
Tizen TV apps development process is ugly as I can have understood in the last few days. 😫
There're several TV Platforms and at the same time there several version of IDEs. And to start development process you should find the right combination between these ones.
Tizen Platform gets installed on the TVs since 2015 and has several versions according to this table:
- Tizen 2.3 (for 2015 models)
- Tizen 2.4 (for 2016 models)
- Tizen 3.0 (for 2017)
- Tizen 4.0 (ta-daam 🎉, drumsound 🥁 , for 2018 ones)
Tizen 4.0 TVs have not even been released yet and the list of available models will be ready at February 2018.
So for the time beeing the latest phisical device with installed Tizen Platform you can use for development has 3.0 version.
Now let's consider available IDEs for Tizen app development:
- Tizen Studio 1.0
- Tizen Studio 1.1
- Tizen Studio 1.2
- Tizen Studio 1.3
- Tizen Studio 2.0
- Tizen Studio 2.1
- And the legacy Tizen SDK IDE (the latest available version is 2.4-rev8)
You can download all of the above from the download archive page.
You do not find these links on official Tizen/Samsung TV development related pages.
Now let's try to download the latest version of Tizen Studio. But there's a note below that says
Note Tizen Studio 2.x supports TV Extension 4.x or higher.
TV Extension is required by IDE to enable TV development. Without it you can create apps only for mobile phones and wearables. Extension version corresponds to Tizen Platform version.
OK. I have, for example, flagmanship Samsung TV device and cannot develop for it with the latest available IDE 🤦♂️
If you try to connect to your Samsung TV from Tizen Studio 2.0 with installed TV Extension 4.0 you will get an error indicating that the Platform Unknown.
So the only one workaround is to download the previous version of Tizen Studio that is 1.3.
Also you need to install TV Extension 3.1.2 as suggested here:
You may download the TV Extension 3.1.2, that should contain packages for 2.X & 3.X development.
Additionally, Rather than Tizen Studio 2.X, I would suggest you to download & Install Previous IDE (For example: Tizen SDK 2.4 Rev8 or Tizen Studio 1.2 )
But when you open Tizen Studio 1.3 it tries to update itself to 2.x version.
So you need to disable autoupdate and install TV Extension manually.
You can find instructions here. (See my comment on Andrew Witte's post)
Only after that you can start normal development for Samsung Tizen TVs and upload your app in the device.
Very VERY terrible experience.
P.S. Based on this I'd also suggest you to give up on your intent to support Samsung Orsay platform.
I'm in doubt that supporting older that 2014 year TV models will have any impact on users and will bring any benefits.
Samsung/Tizen doesn't have acceptable development tools for current devices and what happens with the earlier ones only God knows.
I'm afraid that tools/IDEs/SDKs might not be available any more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But when you open Tizen Studio 1.3 it tries to update itself to 2.x version.
So you need to disable autoupdate and install TV Extension manually.
You can find instructions here. (See my comment on Andrew Witte's post)
Thanks for the advice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be a chaotic scenario @Blinnikov 😢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately it is. 😞
Samsung/Tizen forums are full of angry people who are indignant about the unclear development process.
By the way It looks I found a way to run apps from Tizen Studio 2.x on old devices 2.3+
.
I'll post on this in a while when I test all the scenarios.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just posted an article on Medium describing the problem and the solution 🎉 :
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't really need Tizen SDK to develop the applications.
We need it to:
- Pack and Sign
- Run to Device
- Emulator
For the first two, we can do it without the Tizen SDK (ref: https://github.com/Samsung/vscode-extension-tizentv)
To Emulator we might be able to use only the contents from the "tv-extensions-X.X".
To Samsung Legacy SDK (Orsay?) we can use the stuff from cordova (https://github.com/Samsung/grunt-cordova-sectv/blob/master/tasks/packager/sectv-orsay.js)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dead It's a great solution for standard apps.
As a Samsung partner we are using web hosted apps. So, in this case, we need to replace a index.html with an url in confit.xml at <content src="" />
node. Unfortunately VSCode extension doesn't support this. 😢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dead You need the sdb part still for the extension (tizen studio/sdk) and they include it there
but: sdb is "basically" an adb, which is open source so you can go with it ;)
so it could be done (and it's done here)
- run your adb server with node, use socket and define the protocol
- implement the device discovery (or just map the devices via hand)
- implement the basic commands:
OPEN: (localId, destination = DESTINATIONS.SHELL) => {
//Buffer("OPEN").readUInt32LE(0); // 0x4e45504f
return SDB.pack(
Buffer.from("OPEN").readUInt32LE(0),
localId,
0,
destination
);
},
// and internal command definition:
SHELL: args => `shell:${args}:`,
// and and actual command on the device, it will give an OKAY then the results
const cmd = SDB.COMMANDS.OPEN(0x42, SDB.DESTINATIONS.SHELL("0 vd_applist"));
pack it, then send it thought your server, it will respond, make sure to have the talk going on with the client as it should and voila, in order to support older ones, just de-ref the 1.4 bridge and check the commands
:) 👍
same goes for the emulator,
the packaging is easy as well, signing is in the same samsung like lazy level :)
they mention security all over the place and they still keep using legacy tech on their flagship devices
const chalk = require('chalk'); | ||
const execSync = require('child_process').execSync; | ||
|
||
function defaultCLIEnv() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please avoid hardcoded paths.
This works only for your environment. There's no user celio.latorraca on my Mac.
Moreover, I would suggest to remove this fallback function at all since we force users to have TIZEN_CLI
env variable specified.
|
||
function run(root) { | ||
let tizen_CLI_ENV = process.env.TIZEN_CLI || false; | ||
if (!tizen_CLI_ENV) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed I think.
Throw an Error
if TIZEN_CLI
variable not specified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to think better about this approach. Because React-TV already tries to predict EnvPath on WebOS scenarios. I don't have assure if this is the best approach.
Another idea is allow to set configuration for binary paths on package.json
console.log(''); | ||
console.log(chalk.dim('Setting up Emulator...')); | ||
|
||
const vms = execSync( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Who's interesting on running apps on emulators?
We need to support real devices.
This may be an additional config option (run on device/emulator).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that would be an additional.
But not all developer have real devices to test.
BTW: Check #107, I think it will be a better approach.
).toString(); | ||
|
||
if (vms.indexOf('react-tv-tizen') < 0) { | ||
execSync(`${tizen_CLI_ENV}/../../emulator/bin/em-cli create -n react-tv-tizen -p tv-samsung-4.0-x86`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about 4.0 version.
Should be configurable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For while I'm thinking about support >=3
versions, even for renderer. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For real devices the minimum supported version should be 2.3 I think.
If you look at the TV Model Groups table you can see that a huge amount of TVs supports only 2.3 version.
Also the standard template created in Tizen Studio suggests to use 2.3 version (see config.xml from this PR required_version="2.3"
).
Moreover, almost every application from Tizen apps exmples specifies required version as 2.3.
And for the time being there're no phisical device in the wild with Tizen 4.0 Platform on board (only 2.3, 2.4, 3.0), so >=3
is not correct excatly.
Anyway I think we can proceed with >=3
for emulators since 3.0, 4.0 Plaforms can run 2.3 apps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems a reasonable thought, we can go on with >=2.3
@@ -20,8 +20,15 @@ yarn | |||
|
|||
To run it: | |||
|
|||
WebOS: | |||
```shell | |||
yarn start |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to start-webos
for consistency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -13,21 +13,23 @@ | |||
}, | |||
"scripts": { | |||
"build": "webpack", | |||
"build-prod": "NODE_ENV=production yarn build", | |||
"build-prod": "cross-env NODE_ENV=production yarn build", | |||
"react-tv-cli": "react-tv-cli", | |||
"start": "yarn build-prod && react-tv-cli run-webos", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to start-webos
for consistency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -0,0 +1,12 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" id="http://yourdomain/Template01" version="0.2.1" viewmodes="maximized"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be we need some random id generation here.
Low priority though.
@Blinnikov can you go on with this feature? What do you think? |
It's possible to generate the certificate and send to the device by CLI but only for Tizen certificate :| |
<feature name="http://tizen.org/feature/screen.size.normal.1080.1920"/> | ||
<tizen:metadata key="http://samsung.com/tv/metadata/prelaunch.support" value="true"/> | ||
<tizen:profile name="tv"/> | ||
<tizen:setting background-support="disable" context-menu="enable" encryption="disable" hwkey-event="enable" install-location="auto" screen-orientation="landscape"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice if we could set the screen orientation dynamically :).
return console.log(chalk.dim('[react-tv]'), 'You should add files'); | ||
} | ||
|
||
// TODO: option to create/select profiles? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The user could pass it by a CLI argument or he could be asked interactively here. What do you think? Btw I could help you out.
Is this still being maintained or does it seem like it's an unwieldily uphill climb? It would be great to have a development environment where we can deliver apps on webOS and Tizen at the same time, but it seems like this project hasn't been updated in almost a year, and there's a lot of frustration, uncertainty, and shifting standards about delivering samsung tizen solutions. |
@rdobda-gaia I would suggest that you take a look on a different approach (just what we did)
Just pop your questions if need any ;) |
@fourscience that sounds wonderful, especially to cover so many platforms with one react-based solution. Do you have any starter projects or 'hello world' type apps with this setup to share with the community? I see this as a possible alternative: https://github.com/pavjacko/react-native-vanilla |
@rdobda-gaia
just for example: index.tizen.js in the root folder.
index.webos.js is the same :) in the src/app/ dir we can have compontents/button/index.js and index.tizen.js and index.webos.js and like an example for the build structure: ~/index.js so from here, you can add any platforms, even react native tizen, react native uwp etc... I hope this helps to start, later on of course you can go deeper, for low end devices i would suggest a custom reconciler. you can event push that one with the build process and tailor it for the platforms. a side note: keeping this much of platforms in the same codebase with sanity can be tricky, so before you really do an app with a setup like this, consider how to approach it (like magic remote on lg, touch on smartphones, keyboard on web, remotes for devices, analog controllers for ps4 etc) and how do you wanna separate it etc :) just pop me a message if you have any specific questions. I'll try to answer it |
React native web seems to be a handy as I am experimenting with react-native-vanilla , the sad thing is when you try to make a useful app , where navigation for instance is required. I tried react-navigation >3.x to support web navigation , and neither webOS nor Tizen TVs is working now. I believe a single source for native and web TV apps are terrible idea , keep React-TV the way it is will keep it appealing as is |
Anyone still working on this?. Do reacttv supports tizen tv platform now. |
We ended up going with a pure react with webpack solution. Tizen supports html5/javascript solutions out of the box, and webpack "compiles" down to that solution. It's not native, but works fine and is cross-platform because other tv platforms also support html5/javascript |
@rdobda-gaia I'm also working on a React+Webpack solution, but when I package and sign the |
@ironprogrammer you don't need to be a partner to debug on the device, feel fre to create a cert with your info and debug, on the other hand some priviliges might not be allowed. otherwise you can use sdb to push the wgt to the device |
@fourscience I have a Samsung dev cert set up, but I get a mysterious FYI, I'm connecting to a Samsung PMF-BC, and using https://github.com/ppsirius/tizen-boilerplate to package the app, since the Tizen Studio hangs when packaging the React app. Thanks for the help! |
closed can indicate a lot of things, most of the time there is a specific code in the logs. probably its either a version mismatch or something along the setup, otherwise studio uses sdb to install the app, dont forget to set the cert, enable dev mode on the device and permit it to install apps if needed, feel free to write me a mail about this ;) |
@fourscience I couldn't find your email, so I opened a gist to move the convo out of this thread. Really appreciate your help! |
@ironprogrammer have you uploaded your cert to device? |
@iepsen Via Device Manager, yes. I can connect to the TV, select "Permit to install applications", and receive a "Succeeded to upload a certificate" response. |
mail me at: [email protected] |
Can you share the device model, tizen version, Tizen Studio? And do you know the tv extension version? Please paste your config.xml here if you can. |
@ironprogrammer have you fixed it? |
Any updates is Tizen will be supported soon? |
This seems moot as samsung have their own react-native library now. |
with commits from #54