Software Architect / Microsoft MVP (AI) and Pluralsight Author

Chatbots, MVP, Prototyping, Speech, Tooling, Twilio

Streaming your Android Phone to Windows 10

I’ve been doing a lot with speech to text (STT), Twilio, telephony and voice enabled chatbots.

Sometimes I need to create demos of this in action.  There are quite a few moving parts to this such as:

  • Azure Speech
  • Making the phone call
  • Ngrok to create a tunnel back to my development environment
  • Twilio and Webhooks
  • Visual Studio Debugger instances

 

Demoing remotely and with so many moving parts it makes sense to prerecord the action.

This issue I had was – how do I stream my mobile to my development machine?

I have an older Android phone (yes) and was looking for a simple way to share what was happening on my phone whilst I made a call to the Twilio number and interacted with an API.

Enabling Android Debugging (ADB)

I found a free tool called Scrcpy. It’s a command line tool that mirrors your phones screen onto your computer via the USB cable.  Before using Scrcpy you need to enable the developer feature Android Debugger Bridge ADB) on your mobile.

You might not have access to this due to default factory settings on your phone.

To show this setting you need to browse to: About Phone -> Settings -> Build Number.  When in that menu, tap the build number 5 times. The following option should now be available to you:

That’s the first step complete.

Scrcpy

Next, we need to download and installed Scrcpy. You can find it here for Windows.

With USB Debugging enabled and scrcpy downloaded, all that’s left to do is to run it. Double click on scrcpy.exe.  Your phone will display the following:

Click Allow.

Your phone will then get displayed on your computer. You can now access your phone like any other application on your computer.  Here we can see mine as I type this blog post (Inception!):

You can see a video of this whole thing in action in a YouTube demo I made a few month ago.

In the demo you’ll see how a Twilio number can forward the phone call onto an API in your development machine and play a recorded message down the phone.

There is also an accompanying blog post here.

JOIN MY EXCLUSIVE EMAIL LIST
Get the latest content and code from the blog posts!
I respect your privacy. No spam. Ever.

Leave a Reply