Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4618982
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:21:46+00:00 2026-05-22T02:21:46+00:00

Hello I wish not to disturb but I’m newer to developing program. I’m trying

  • 0

Hello I wish not to disturb but I’m newer to developing program.

I’m trying to make a video playing in an activity but I get always black screen.

My video is in mp4 h264 created with ffmpeg with android profile and plays in quicktime and is set in res/raw/corsolex_1.mp4

I attach the code I’m writing to understand what I miss to do, if someone can help I’m very grateful.

Angelo

this activity is called Clipvideo1

package com.wocmultimedia.VideoEditLesson1;

import android.app.Activity;
import android.media.MediaPlayer;
import android.os.Bundle;

public class Clipvideo1 extends Activity {@Override
     protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.clip1);

// Put the media file into the res/raw folder of your application
MediaPlayer mp = MediaPlayer.create(this, R.raw.corsolex_1);
mp.start();
}}

this is the XML layout called clip1.xml

<FrameLayout android:id="@+id/linearLayout1" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    xmlns:android="http://schemas.android.com/apk/res/android">
        <VideoView android:id="@+id/videoView1" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content"></VideoView>

    </FrameLayout>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T02:21:46+00:00Added an answer on May 22, 2026 at 2:21 am

    You don’t link the video to VideoView somehow.

    So as you see you have 3 parts of the uri:

    1. “android.resource://”
    2. “com.wocmultimedia.VideoEditLesson1”
    3. your resource

    “corsolex_1” is the name of your video

    Maybe this code helps:

    @Override
        public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    
        setContentView(R.layout.clip1);
    
        VideoView videoView = (VideoView) findViewById(R.id.videoView1);
    
        Uri videoPath = Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.corsolex_1);
    
        videoView.setVideoURI(videoPath);
        videoView.requestFocus();
        videoView.start();
    
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello I am compiling a program with make but I get the error of
Hello I am trying to use regular expressions in a java program. I would
Hello I'm trying to make a simple web chat, and I want the user
Hello i wish to be able to deploy a PHP web application along with
Hello I am in the process of trying to colorize and swap colors on
Not as in can't find the answer on stackoverflow, but as in can't see
Hello! There is a controller and an action which receives one param through GET,
I wish to securely delete (not even a trace in memory) anything that user
I'm, playing with the Android framework and try to get my mind deeper into
Hello I wish I could define two filters like this <filter-mapping> <filter-name>SecurityFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.