Embed one or more YouTube videos​ in Sketchware App

Embedding a YouTube video in Sketchware Android App is very easy using iframe. YouTube itself provides the iframe code for embedding youtube videos.

To insert a YouTube video in your app, insert a webview in View area, at a location you want to display the YouTube video. You can insert more webview widgets, one for each video you want to display.

Set the layout_height of all webview widgets to wrap_content.

After that in Logic area, in On activity create event, use webview loadUrl block. In the space for Url, write the following code as shown in image below:
data:text/html, <iframe width="100%" height="" src="http://www.youtube.com/embed/5aMQZ7mSgD4" frameborder="0"></iframe>

Replace the highlighted code with your YouTube video id, and change height and width of iframe as per your requirement.

Save and Run the App. Your app will display your YouTube videos at your desired location.

Here is a video of the process:

Comments

  1. HELLO FRIENDS MENE EK APPS BANAYA HE SKETCHWARE SE USE PLAY STORE PAR RAKHA OR ADMOB APPLICATION SE GOOGLE PLAY KA APPS ADD KIYA PAR ADD NAHI AA RAHI HE YE MERE APPLICATION KI LINK HE PLEASE HELD ME......SKETCHWARE ME KOI CODE DALNA HOTA HE?

    PLEASE HELP ME

    https://play.google.com/store/apps/details?id=com.my.allnewspaper

    ReplyDelete
  2. Bhai to add Admob ads, you have to edit source code of your App, as per instructions given by admob. You can edit it in Android studio or Eclipse, but it is very complicated process. I'm not familiar with that.

    Another alternative is to create very good apps and sell them on Play store.

    ReplyDelete
  3. Sketchware YE APPS SE POSSIBLE NAHI HE?

    ReplyDelete
  4. How to make fm radio app plz give me replay ...

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete
  6. Thanks for sharing such a useful information, I will be checking your blog for further updates and information youtube video

    ReplyDelete
  7. sir,if i press fullscreen button..my webview1 wont go full screen..but its only being half screen shown...please help

    ReplyDelete
  8. After writing that code and run, this error being appered, "Stop block does not exist in forever block" what can i do Sir

    ReplyDelete
  9. It’s not as complicated as regular SEO. It’s not as money- or time-intensive as getting your own website to the top of Google. But just like Google search, YouTube has its own search algorithm. hitet 2021

    ReplyDelete
  10. How to add video playlist under any button. As I created button named english compulsory then how I watch the video on clicking the button.

    ReplyDelete
  11. AutoPlay Media Studio Crack
    Great set of tips from the master himself. Excellent ideas. Thanks for Awesome tips Keep it up

    ReplyDelete
  12. I really loved reading your blog. It was very well authored and easy to undertand. Unlike additional blogs I have read which are really not tht good. I also found your posts very interesting. In fact after reading, I had to go show it to my friend and he ejoyed it as well! Buy youtube watch time

    ReplyDelete

Post a Comment

Popular posts from this blog

Simple car racing android game in Sketchware

Creating a Drawing View in Sketchware

Enable Fullscreen for Youtube videos in WebView

How to enable upload from webview in Sketchware?

List of Calendar Format symbols valid in Sketchware