Can you customize the cast modal dialog in the Web Sender App? - browser

Youtube for example has a cast dialog in which they display an image with a colored background. I am wondering if that is at all possible by using a styled media receiver. As far as my research goes, I could only find overwriting the Cast SDK for Android but I thought that is a platform native solution, while the browser might be an exception.
Anyone who has made this happen?

Related

Configure Kotlin Notification In Android Studio made rendering preview

I applied this notification without knowing what it does. Now UI is missing. It says "Some issues were found while trying to render this preview" while preview and when I run app, It shows a blank surface. How and Where can I configure this?
Finally I find what the notification changes in the project.
when I apllied notificitaion , it adds build.gradle:app to this twice like below.
implementation 'androidx.core:core-ktx:+'
implementation 'androidx.core:core-ktx:+'
Although I have already implemented this
'androidx.core:core-ktx:1.9.0'
This leads rendering problem.

Electron custom web browser with on screen keyboard

I am trying to make a custom web browser inside an electron application. Using webview (because iframe is not loading some necessary web pages) I can load a web page.
Then trying to write something into the web pageĀ“s input by clicking on the react-simple-keyboard which causes blur event, so input loses focus.
I figured out, that this approach would not work directly, so via ipc communication I am trying to resend the key button value and then set it to the window with const {keyboard} = require("#nut-tree/nut-js"); keyboard.type(args.value);
In my input, above the webview tag, it works like a charm, but I am not able to type inside the webview.
Can anyone help me to solve this problem or does anyone know a perfect solution how to use other OSK in electron app or how to open native windows osk on input focus? Thank you in advance.
I'm not sure how you'd accomplish that with this library. But you can just use Window's default on-screen-keyboard to accomplish that. Here is a link to how enable it. windows support
You should also use a BrowserView instead of a Webview, as the Webview is not guaranteed to be present in future versions and it's API is unstable.
The BrowserView doesn't work like an HTML element though and you should read the docs here.
But anyways, just use the system's default and you should be fine.
Also, if you're interested, I'm developing a web browser with Electron (in fact, I'm currently writing this using that browser) and as far as I can say, it's written pretty simply and anyone should understand most of it, so take a look if you're in trouble. But I am no expert and you shouldn't rely on my code as a standard of any kind, really.
Well, I might have just found an answer for you.
Firstly, as I mentioned, you should use a BrowserView instead of webView for your external content, and this time it is a requirement for this method to work. I would create a BrowserWindow with the controls at the top, then place a BrowserView to act as a "browser" and create another BrowserView at the bottom and load in the keyboard html file. And then, when a key is pressed on the virtual keyboard, you should send an ipc message to the main script with the information of what key was pressed(it should be done via a preload script for the OSK BrowserView). In the main script, once you recieve the ipc message (via ipcMain.on()) you should then send an input event to the BrowserView containing your external content. That's done by calling contents.sendInputEvent(Event), so it has to be a main script. Here is a link to contents.sendInputEvent(Event), BrowserView (link) and preload script as well as ipc communication (link).
As for invoking the keyboard once you click on the input element, you could probably do it with a preload script for your "browser's" BrowserView, if you can find how you can check whether the focused element is an input element or something like that, and call an ipc message to then hide or show the keyboard. (Hiding and shwoing the keyboard could be done by calling BrowserWindow.addBrowserView(BrowserView) or BrowserWindow.removeBrowserView(BrowserView). But you would have to search the documentation yourself for those methods as I can't write anymore right now. Documentation could anwser any of your questions if you search for it there.

Using Presentation API / Google Cast to present a clock website

I've been searching on this for a while. I've read up on the Moz and Google documentation for the presentation API, however, I am unable to cast the website when prompted because it says the TV is "available for specific video sites."
I've searched some more and found that you must pay $5 (which I would be willing to do if I knew it would work) to register a receiver. After searching Stack Overflow for google cast, it seems that nearly everything has been disabled. I've tried putting in an empty video element but it still does not work.
I also see that a receiver is a different html page, but also that it would be uploaded as an Android app (?). I know that the presentation API is a generic presentation API, while Google Cast is specifically for Chromecast it seems. I can't seem to get anything working on any device or method to cast to the TV. I can cast YouTube but that's it. I'm wondering how I would go about getting my clock website castable to a TV. Thanks in advance.
Casting a tab help article doesn't seem to work for me either.
Here are relevant screenshots:
Mozilla Docs Presentation API
Chrome Sample Presentation API
Google Web Docs Presentation API
Google Cast Docs
It seems like you are trying to cast to a Samsung TV. Samsung TVs however don't really support support the real deal Chromecast protocol where you can mirror screens. I think what Chrome does here is when you are watching on supported site like Youtube or Twitch - it will remotely launch the right "App" on your Samsung TV and send over the link. It is however not possible to mirror ANY website.

When ToastBar messages are manually cleared, components below them are clicked as well... Any suggestions?

I am testing a mobile app I have built and noticed that when I manually clear a ToastBar message through the touch interface, if there is a Component beneath it, such as a Button, it is clicked as well.
I know that in Android native development, it is possible to mark a Component in a way that does not allow this to happen. Does anyone know if there is such a method or "attribute" in Codename One too?

Display pdf document in flutter windows

I have been finding it difficult to display a pdf on flutter windows and other desktop applications. Can someone help me out
This is the same as this question, but for Windows, so the answer is the same at a high level. As with Linux, PlatformView is not yet supported for Windows.
Two options that could work without PlatformView support:
Swap the window between displaying the Flutter view and a PDF view (if you want the PDF to fill the window while displayed).
Place the Flutter view and the PDF view side by side in the window (if you want both Flutter content and PDF content visible at the same time).
Both would require the work to be done in the native code, so you would need to either write a plugin, or implement it directly in your runner, and use a method channel to coordinate between Dart and native code.

Resources