Android Example Youtube master&slave

Hi,
I have assembled a few examples and I added the code to have a system to control via Bluetooth remote viewing of clips from youtube with two smartphones. A "slave" to be connected with a hdmi cable to the tv the other to select the clips to watch.
Apps surely work on android 4.3 but I did not believe they can run on minor version. I tested on SIII and SII and they work.
Sorry for my English.

Evidently you have got a usb to hdmi device to connect smartphone to hdmi port of tv.

First you have a Youtube developer key.
http://www.b4x.com/android/forum/threads/youtube-library.24818/#content
Follow these instructions
https://developers.google.com/youtube/android/player/register

You have to have also the bluetooth MAC of one smartphone (master device) Turn on Bluetooth then settings - other - device info.

Second you have this libraries:

Phone
RandomAccessFile
SNYoutube
Reflection
Serial
Http

http://www.b4x.com/android/forum/threads/customyoutubefeed.33717/
http://www.b4x.com/android/forum/threads/youtube-view-embed-videos-in-your-apps.31430/#content
http://www.b4x.com/android/forum/threads/android-bluetooth-bluetoothadmin-tutorial.14768/

Apps are based on excellent work of Erel, NJDude and socilanetis; I credit to their more 98% of the work.

I added just a few lines of code on their good examples.

Thank you again.

In Slave

B4X:
Dim YTAPI =  "YourTubeDeveloperKey" As String ' here youtube developer key
Dim BTMac =  "xx:xx:xx:xx:xx:xx" As String ' here bluetooth mac

you have to replace YTAPI with your Youtube developer key
and
BTMac with bluetooth mac of device where you'll install Master.

Layout form Master is SIII Galaxy.
Layout for Slave is SII Galaxy.

Connect the slave device to hdmi port of your TV, on Tv you must see the device main screen.

Start on Master device YTMaster (bluetooth on ) and press "Make device discoverable" on dialog tap on YES.
Now you can start on Slave YTSlave application.

You can type for a Youtube video on master editext then tap on search, after you can choice the video it will be available on slave and on tv.

Enjoy.

Criticisms and suggestions are welcome.
Sorry again for my bad English.
 

Attachments

  • Master.zip
    11.4 KB · Views: 423
  • Slave.zip
    10 KB · Views: 429
Last edited:
Top