资源简介

一个简单的Android 音乐播放器+视频播放器开发源码(包含说明文档),供Android移动开发的初学者们借鉴与参考。开发环境 : AndroidStuido+Ubuntu

资源截图

代码片段和文件信息

package com.world.my.mymusicplayer;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;

import static org.junit.Assert.*;

/**
 * Instrumentation test which will execute on an Android device.
 *
 * @see Testing documentation
 */
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
    @Test
    public void useAppContext() throws Exception {
        // Context of the app under test.
        Context appContext = InstrumentationRegistry.getTargetContext();

        assertEquals(“com.world.my.mymusicplayer“ appContext.getPackageName());
    }
}

评论

共有 条评论