Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tizen webapis access #713

Open
MomoDeLuxe opened this issue Sep 13, 2021 · 10 comments
Open

Tizen webapis access #713

MomoDeLuxe opened this issue Sep 13, 2021 · 10 comments
Labels
question I have a question!

Comments

@MomoDeLuxe
Copy link

It doesn't work with me to access Tizen webapis API. Any solution for that?1

@MomoDeLuxe MomoDeLuxe added the question I have a question! label Sep 13, 2021
@mihaiblaga89
Copy link
Contributor

Can you please provide more details about where/how you expect the tizen apis to be available? They should work, code, you should have global.tizen and global.webapis available.

@MomoDeLuxe
Copy link
Author

MomoDeLuxe commented Nov 13, 2021

Well in debug mode webapis is not available, thought it is common. Had to you use static DEV params and it works. But, is there is any way to access webapis in DEV mode?!

@MomoDeLuxe
Copy link
Author

Mind that app shell doesn't include $WEBAPIS script tag in header.

@mihaiblaga89
Copy link
Contributor

mihaiblaga89 commented Nov 13, 2021

The code that I referenced, the appShell thing which waits for 5s and then loads the webpack-dev-server URL that's running on your machine, only runs on DEV mode. So I'm guessing they should be available. Do a console.log(typeof webapis, typeof global.webapis, typeof document.webapis) and see what it says. Or the same console with .tizen instead of webapis. That code is basically injecting those variables into the iframe, so if the TV provides them they will be present.

@MomoDeLuxe
Copy link
Author

I did, but always webapis undefined in debug mode, while .tizen is there as will well as .avplay

@mihaiblaga89
Copy link
Contributor

then I'm guessing it's a limitation by the tv? If it exists it should be injected. But I think you can debug prod applications with weinre. Can you try to run your prod version with --debug weinre and see what happens?

@MomoDeLuxe
Copy link
Author

Got the same behavior. I did find the way around by implementing debug static params also had to build on screen debug module.

Screenshot 2021-11-13 at 22-03-08 Hello MOOV

@MomoDeLuxe
Copy link
Author

Well, ReNative v 0.32.1 webapis API ARE PRESENTED :)

@SimoneCarnio
Copy link

It's not very clear to me how to access tizen object, for example, how to access this?

tizen.application.getCurrentApplication().exit();

when I try to access the "application" property (also in chrome devtools) the tv app instantly crashes without any error message

@SimoneCarnio
Copy link

It's not very clear to me how to access tizen object, for example, how to access this?

tizen.application.getCurrentApplication().exit();

when I try to access the "application" property (also in chrome devtools) the tv app instantly crashes without any error message

just realised that with "bundleAssets": true in the debug scheme it works, when using appShell it crash (renative 0.33)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question I have a question!
Projects
None yet
Development

No branches or pull requests

3 participants