Screen Mirroring

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

trevix
Posts: 960
Joined: Sat Feb 24, 2007 11:25 pm
Location: Italy
Contact:

Screen Mirroring

Post by trevix » Thu Dec 10, 2020 1:55 pm

I have a LC App, for iPHone and Android, that needs to screen mirror its content to a TV. Smart or not.

Google ChomeCast and EZcast 2, HDMI devices that allow this using wifi, require an external app for the mirroring.
After reading tons of pages on the argument, I found that there are many incompatible standards but not a universal solution for both platforms.
Even doing it with cable is a mess.

Is there any way that I can enable my LC App for some direct screen mirroring of any sort?
I did not find any reference on this on the forum.
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9388
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Screen Mirroring

Post by richmond62 » Sat Dec 12, 2020 9:19 am

I don't think LiveCode can send signals to the operating system of
whichever platform it is operating on to change the setting of that operating system.

Having said that (and feeling slightly foolish) you might like to look at shell commands.

https://livecode.fandom.com/wiki/Shell

"The commandLine must be a valid shell command on the current operating system."

https://awesomeopensource.com/project/a ... /replaykit

trevix
Posts: 960
Joined: Sat Feb 24, 2007 11:25 pm
Location: Italy
Contact:

Re: Screen Mirroring

Post by trevix » Sat Dec 12, 2020 12:53 pm

Well...is all well above my knowledge.
Just for the sake of it, I think that Screen Mirroring of mobile device to TVSets is going to be a big thing.
It's a tough subject, given the standard war that is going on (MiraCast, MHL, SLIMPORT, DNLA, AIRPLAY).
Even using wire, it is complicated by the number of different USB connectors that this damn hardware manufacturer are pulling out year after year.
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9388
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Screen Mirroring

Post by richmond62 » Sat Dec 12, 2020 12:59 pm

Well...is all well above my knowledge.
Ha, Ha: unfortunately both You and I belong to an extremely unexclusive club. 8)

trevix
Posts: 960
Joined: Sat Feb 24, 2007 11:25 pm
Location: Italy
Contact:

Re: Screen Mirroring

Post by trevix » Sat Dec 12, 2020 1:20 pm

I wonder if you can come up with some ideas for solving this problem on my App (iOS and Android).

It's an App used to do Tennis, Padel and Ping Pong scoring.
Before starting the match, you launch the app (it's called "Segnapunto") in your mobile phone and, using small hardware bluetooth button, you advance the score (that is also declared by a loud voice).

The idea of mirroring to a TV set, is to enable a Tennis club to have a big score board where players can see the score and listen to it by the speaker of the TV (much louder then a phone. We now use a bluetooth speaker).

1) Most of the TV, nowadays, are smart, in the sense that they can display a browser: could it be possible from LC, to compose a web page of its screen that gets transmitted in real time using a local networked to the TV browser?

2) What about instead if, attached to the HDMI of the TV, there is a fixed device (mobile,Windows, else) set by the Club.
Could it be possible to have two LC Apps, one on the personal phone of the player and one fixed on the TV set, to synchronise their display content trough local network. I could just send small commands from one App to the other, one being a client nd one being a server. Is it faseable?

Thanks for any suggestion
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9388
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Screen Mirroring

Post by richmond62 » Sat Dec 12, 2020 1:53 pm

Well, if it's any help at all, I'd like to suggest a totally simple and goofy alternative:

I have a laptop (running Xubuntu something-or-other) that has an HDMI-out socket.
My wife and I tend to use it to watch films streamed over the internet by connecting it via
an HDMI cable to a widescreen TV.

So, why not make a 'normal' (i.e. for desktop) standalone for Windows/Linux/Macintosh,
run it on a laptop mirroring via a cable to a widescreen telly?

trevix
Posts: 960
Joined: Sat Feb 24, 2007 11:25 pm
Location: Italy
Contact:

Re: Screen Mirroring

Post by trevix » Sat Dec 12, 2020 2:40 pm

We earn money with the downloads our App and sell of our buttons.
Also, using thier device,they carry their score stats, unfinished match, etc.
Beside Players need to start the game, correct the score, navigate preferences. A computers needs a mouse.All- in-one desktop touch ould be too expensive and non appropriate for outdoor use (even TV but easier to solve).
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9388
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Screen Mirroring

Post by richmond62 » Sat Dec 12, 2020 3:00 pm

We earn money with the
Aha.

A lot better than I have ever done: this year my Devawriter has brought me $50. 8)

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7237
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Screen Mirroring

Post by jacque » Sat Dec 12, 2020 6:39 pm

Android has screen mirroring built in for Chromecast. The easiest way would be to use that from an Android phone (I'm not sure how iOS does it.) But it does require wifi, do you have access to wifi during a game?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

trevix
Posts: 960
Joined: Sat Feb 24, 2007 11:25 pm
Location: Italy
Contact:

Re: Screen Mirroring

Post by trevix » Sat Dec 12, 2020 7:08 pm

Yes. I have ChomeCast and it works fine from Android ( given that you downloaded Google Home and there is a Internet Wifi).
The bad thing is that it does not work with direct Wifi. So you need an internet connection. Most of the playing courts, for my experience, don't have Wifi.
I am waiting for EZCast, another mirror dongle that, hopefully can do Wifi direct.

On iOS ChomeCast works if you download a specific Mirror App (like "Replica" $$). Cumbersome for a player that want to go there, connect and play: My App, Google Home, Replica.

In teory, google has an SDK for ChromeCast,but probably is very hard, if impossible, to implement it in LC
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>

simon.schvartzman
Posts: 641
Joined: Tue Jul 29, 2014 12:52 am
Location: Brazil

Re: Screen Mirroring

Post by simon.schvartzman » Sun Dec 13, 2020 11:38 am

Just an idea: what if together with the button you include a Rapsberry Pi that interacts with your App through Bluetooth?

That should be a turnkey solution and there is no need for a SmartTV and/or Wifi.

Hope it makes sense,

Best
Simon
________________________________________
To ";" or not to ";" that is the question

trevix
Posts: 960
Joined: Sat Feb 24, 2007 11:25 pm
Location: Italy
Contact:

Re: Screen Mirroring

Post by trevix » Sun Dec 13, 2020 3:35 pm

But can now LC compile and install an App on the Rasperry? I thought it was still pending...
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7237
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Screen Mirroring

Post by jacque » Sun Dec 13, 2020 6:11 pm

I want to be sure I understand the goal. Right now a score is announced and users manually update the score in their copy of your app. Do you want to:

1. Show the score on a large TV screen. Users would still update their app manually, or
2. Show the score on the TV and have it also update every user copy of the app

I think you want #1 because you need wifi to update remote devices. Is that right?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

trevix
Posts: 960
Joined: Sat Feb 24, 2007 11:25 pm
Location: Italy
Contact:

Re: Screen Mirroring

Post by trevix » Sun Dec 13, 2020 6:33 pm

This:
1. Show the score on a large TV screen. Users would still update their app manually
(using the remote bluetooth controller)

The TV set is not mean to be interactive: it must only show the phone screen and play the sound it receives.
That is: "screen mirror".
But since"Screen Mirror" is so complex to set up for users, I was asking if there were other ways to do an similar thing.

The Raspberry is a great idea (if LC can install an App on it) because the only thing needed would be to setup a client/server connection and send command form the Phone App to the Raspberry App, using the local network:

A Bluetooth Button > B PhoneApp (advance the score and, working as a client, send a command to > C Raspberry App (same as PhoneApp but works as a server): repeat the action and display image and sound on the TV set (using HDMI).
This way I could even sell the Rasberry as a mean for having a score board on Tennis Clubs $$.

I have see that there is a Rasberry section on the Forum, but from the last message it appears that there is not a LC for Raspberry yet and it may not ever exist.
Sure, I could run the thing on a windows computer but the difference in price is quite big.
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>

simon.schvartzman
Posts: 641
Joined: Tue Jul 29, 2014 12:52 am
Location: Brazil

Re: Screen Mirroring

Post by simon.schvartzman » Sun Dec 13, 2020 8:54 pm

Hi Trevix, your are right as far as I know there is no LC for Rapsberry but I guess (I've never developed anything for the RPi) it shouldn't be too difficult to achieve your goal. After all the only thing the RPi should be doing is reading the data through Bluetooth and displaying it.
Simon
________________________________________
To ";" or not to ";" that is the question

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”