Experiment 6 play audio and video in the app

Source: Internet
Author: User

Lab Report

Course Name

Mobile Internet development based on Android platform

Date of experiment

April 15, 2016

Name of the experimental project

Play audio and video in the app

Location of the experiment

S3010

Type of experiment

-Verification Type √ design type-comprehensive type

Hours

2

The purpose and requirements of the experiment (the knowledge points which are involved in this experiment and are required to be mastered)

Purpose

Enables processing of audio and video in an application.

Requirements

1) Realize playback audio, audio playback control;

2) realize playback video, video playback control;

3) Use service services to play music from the project source file.

second, the experimental environment (the hardware equipment and related software used in this experiment)

(1) PC Machine

(2) Operating system: Windows XP

(3) Software: Eclipse, jdk1.6,android Sdk,adt

Third, the contents and steps of the experiment

1) New Project Music

2) Modify layout file Activity_main.xml, add videoview.xml file

3) Modify Mainactivity.java, new Videoviewactivity.java

4) Create a new Musicservice class that uses the service service to play the music in the project source files, enabling the background to continue playing audio.

Four, the experimental results (the experimental source program list and operating results or experimental conclusions, experimental design drawings)

Code:

Activity_main.xml Code:

Videoview.xml Code:

Mainactivity.java Code:

Videoviewactivity.java part of the code:

Musicservice.java Code:

Run Result: ()

Play music from the source file:

Play music from the local file system:

To play music on the network:

"Play Stop" button:

Play Video:

The "Back" button enables the end program to return to the desktop.

Five, Experimental summary (analysis of the results of the experiment, experience and improvement of experimental ideas)

The experiment was done well, and there were no problems encountered during the experiment, and there were many gains.

Experimental reviews

Experimental results

Guide Teacher Signature: Date

Experiment 6 play audio and video in the app

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.