Skip to first unread message


Aug 22, 2019, 6:27:50 AM8/22/19
My intentions with my app was to use the videos in my assets in MIT app inventor and call those video files in a local html page using webviewer...soon i learned that webviewer was somehow limited.

I followed a few tutorials of people claming that it was possible to allow the webviewer to play videos if we decompiled the apk from inventor, they mentioned that it was mandatory go to the androidmanifest.xml just to add added this line

<uses-sdk android:targetSdkVersion="14" android:minSdkVersion="7"/>:

then compile the apk and sign it.
i did those steps...didn't work

The problem is that i dont see no change, i cant play the videos on my app using the webviewer.

Did someone try to do this in 2019?
Did i missed something or have to put something different?

Chris Ward

Aug 22, 2019, 6:55:27 AM8/22/19
to MIT App Inventor Forum
Hello Desentonar

The advice you have there might still be pertinent. First, about the WebViewer - it is a component defined for Android by Google. It has been steadily enhanced through the versions of Android, but is only a sub-set of a "full" browser, so there are things that it cannot do that you can with a full browser. That said, it is very capable and developers using App Inventor and other programming languages use it for all kinds of things, not just viewing web pages on the internet.

Unless the video files are tiny, they can't be stored as App Inventor Assets since there is a 10mb limit for the whole App. There are ways around the limitation but we don't want people jumping in with a magic wand until we know exactly what your goal is, right?

To help you, we need to know the facts about what you want your App to do.

1) Do the videos belong to you?
2) How many videos?
3) Approximate average file size (MB)?
4) What is their file format?
5) Where are they?
6) Are they already post-processed for mobile phones?
7) Is this App only for your personal use or for distribution (e.g. Google Play Store)?


Aug 22, 2019, 3:35:47 PM8/22/19
to MIT App Inventor Forum
Have you seen the Videos section of FAQ



Aug 22, 2019, 3:42:51 PM8/22/19
to MIT App Inventor Forum
Hello Chris Ward...

Look, im very confused by your asking a coding question.
this is because i want to test if i can develop my app with mp4 video...
i saw you giving relevant information in the other thread, you did not ask about intentions or copyright, why now? whats the point of asking if my app is going to be for distribution (e.g. Google Play Store) if this cant be done in 2019?.

The thing is some of you can do you mind sharing the information? in the other posts you mentioned some steps, i did follow them...if my code is correct i will take a look at my mp4's (maybe even optimise them even more) if its wrong then i will try to correct it, but i need to know what im missing.

The videos belong to me, the are simple and small animations that i put on the back on some htmls to make them look fancy. i also know about MIT app inventor limits, and how to go around that issue...but thats not my question.

In the tittle of my post i added the format im using... mp4 :

And i only used that format since it was a used in here:

The video files are around 500kb Max, 3 videos to be precise, and like i mentioned in my post the videos are stored in the asset folder...

thanks Chris, i dont know if this is the info you requested.
i did not expect a legend like you to respond, but since you did, is my code correct? do i need to change something?

Can somebody in the community help me out?


Aug 22, 2019, 3:44:45 PM8/22/19
ABG ... Sadly, that link is not relevant to what im asking.

Chris Ward

Aug 22, 2019, 4:31:16 PM8/22/19
to MIT App Inventor Forum
Hi Desentonar

1) If the files belong to you, we can change their format
2) The number of Videos is important concerning APK size and how much work we would have to do if wanted to change the format for example.
3) APK size - note Google is questioning 'large' APKs on upload to Play Store and how suited the files would be for a one-off download on first launch of App.
4) My fault, that should ask if MP4 is the original format (again with a view to format change and device suitability)
5) ....Can we have one to test with (or if content sensitive, one that is representative in every way)
6) (not answered). If already post-processed, great if we can use them, not great otherwise because we can't necessarily reprocess them without loss of quality.
7) App Inventor Apps are being uploaded to Play Store in huge numbers.
If you think it can't be done in 2019, is that because of the WebViewer bug in Android 9? MIT have their own fix that has passed all tests so far and an update release is pending.

So, given that we do not need to worry about file size or quantity (both OK), we have more freedom to find a solution. How about that sample? One MP4 file and one HTML embedding it.


Aug 22, 2019, 8:36:07 PM8/22/19
to MIT App Inventor Forum
Works for me with webm and mp4

<!DOCTYPE html> 

<video width="200" controls autoplay muted>
  <source src="myvideo.webm" type="video/webm">
  <source src="myvideo.mp4" type="video/mp4">
  Your browser does not support the video tag.


Note: autoplay doesn't always or necessarily work on android devices
Below blocks tested in companion.

blocks (4).png


Aug 23, 2019, 3:05:10 AM8/23/19
to MIT App Inventor Forum
Thanks for responding TimAI2, are you telling me the code is correct? i just added this in the androidmanifest.xml:

<uses-sdk android:targetSdkVersion="14" android:minSdkVersion="7"/>

You uploaded the videos in the assets, right?


Aug 23, 2019, 5:41:53 AM8/23/19
to MIT App Inventor Forum
this is the path to assets for Companion

for APK you have to use this:
(simpliest way is to use Taifun's Tools extension: )

why should that help?
<uses-sdk android:targetSdkVersion="14" android:minSdkVersion="7"/>

If the app is to be published on the Play Store, the following must apply:
minSdkVersion = ? (mostly API 16, Android 4.1 - Jelly Bean)

compileSdkVersion = 28
targetSdkVersion = 28

You can (should) not change the last two, only the first one to set your lowest API level on which your App can be installed.


Aug 23, 2019, 6:19:11 AM8/23/19
to MIT App Inventor Forum
For my example videos in assets

No requirement to edit the manifest for my example


Aug 23, 2019, 11:54:36 AM8/23/19
to MIT App Inventor Forum
I want to thank BodyMindPower and POWER user TimAI2 for their useful and concise responses, they were right, i think confused people like me will find so much value in this post.

i didn't need to edit  androidmanifest.xml at all to be able to play MP4 videos, i researched similar problems in this forum and I clearly followed the wrong solutions, BMP got me on the right path again.

A key factor of my confusion was that my MP4 videos were on autoplay (no controls), so i just concluded that videos didn't work when my videos didnt play automatically. for some reason, without looking my code MR. TimAI2 suspected what was my problem and told me"autoplay doesn't always work on android devices", he was correct.

MVP's of this forum : BodyMindPower and TimAI2
Thanks again.
sincerely, desentonar.
Reply all
Reply to author
0 new messages