Video on Android

Anyone has any idea how to play a local (embedded into app) video on Android?

Thanks in advance.

1 Like

Hey guys, seems im lost !

WebBrowserComponent is not even implemented, anyone has any idea?

Ok, stuff i tried:

File::getSpecialLocation and friends <- fail miserably (even just trying to acces it fails)

file:///android_asset/ <-WebBrowserComponent is not even coded yet

So i think I now need help onto how do i mix a pure Java View with Juce Stuff…

I mean cmon Google its just a video…!!

Cheers and thanks in advance, any help will be appreciated.


Yes, sorry - this is stuff that’s in our backlog but just hasn’t made it into reality yet. There will be a java android view that we can embed, just need to write the code to do it…

Hi Jules, any update on this?

I really need to finish some app this week, can you point me at where to start or something?

Cheers J

Oh, it’s not very straightforward - would need all kinds of hackery to be done to load whatever Android’s video view object is… There’s no easy starting point I could point you at, other than copying how the openGL window embedding is done.

1 Like

damn, yeah i don’t do much Java, can i buy you guys a beer or something to get this VideoView /WebBrowsercomponent working in the next 2 weeks?

its funny cause im controlling lights, sound, and other cool stuff with juce, but i can’t play a video on Android :cry:

you can do it Jules !! You’re the grandmaster funkazoid!! please please please x1000

We’re all busy on juce 5 features stuff for the next few weeks, I’m afraid! If it was a task that someone could do in a couple of hours then I’d offer to squeeze it in, but it’s not quite that easy…

you just broke my heart, we may lose a project we are bidding cause of this

:cry: :cry: :cry: :cry: :cry: :cry:

That’s bad timing - Fabian has been building a bunch of clever java wrapper generation code to make it easier for us to quickly add stuff like this, but it’s not ready yet!


I know, Its just that it will be awesome if we could complete this, we’ve built this great app for In Store Marketing for Philips Hue Lights, if we win this the app will run in thousands of stores all over the U.S. and the freaking thing now works! it controls any number of lights, its fast awesome, all juce…

its just missing a demo video that client specified, and since they already have a thousand of those android tablets, its not cost feasible to substitute them for ios devices (which does feature the WBComponent)

Im praying to God that it illuminates my dear British friends…JulesNCo®

cheers J

Hey, poking around i got this awesome tip from Navira:

i will try it later when i get home, but hope this helps Fabian and friends to accomplish some JavaC++Magic

Cheers guys! :slight_smile:

Why don’t you add your JUCE app as a view within an Android app. That way you can then add any custom Android component you need. Use JNI to send messages back and forth. See for an example.

Yay! I got it done in 2 hours!
Thanks Navira!

–Will be awesome if all this wont get overwritten in the next PaidJucer save…


public final void playDemoVideoFullscreen ()
        Uri videoUri = Uri.parse("android.resource://"+getPackageName()+"/raw/video_fullscreen");

        final VideoView videoHolder = new VideoView(this);



        videoHolder.setOnPreparedListener(new MediaPlayer.OnPreparedListener()
            public void onPrepared(MediaPlayer mp)

        videoHolder.setOnTouchListener(new View.OnTouchListener()
            public boolean onTouch(View v, MotionEvent event)
                return true;



METHOD(playDemoVideoInScreen, "playDemoVideoInScreen", "()V") \


static void JUCE_CALLTYPE playDemoVideoInScreen ();


    void JUCE_CALLTYPE NativeMessageBox::playDemoVideoFullscreen ()
    android.activity.callVoidMethod (JuceAppActivity.playDemoVideoFullscreen);