-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaddingAudio.java
More file actions
44 lines (36 loc) · 1013 Bytes
/
Copy pathaddingAudio.java
File metadata and controls
44 lines (36 loc) · 1013 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package com.example.thenewbonston;
import android.app.Activity;
import android.content.Intent;
import android.media.MediaPlayer;
import android.os.Bundle;
public class Splash extends Activity{
MediaPlayer ourSong;
@Override
protected void onCreate(Bundle TravisLoveBacon) {
// TODO Auto-generated method stub
super.onCreate(TravisLoveBacon);
setContentView(R.layout.splash);
ourSong = MediaPlayer.create(Splash.this, R.raw.sound);
ourSong.start();
Thread timer = new Thread(){
public void run(){
try{
sleep(5000);
} catch (InterruptedException e){
e.printStackTrace();
}finally{
Intent openStartingPoint = new Intent("com.example.thenewbonston.STARTINGPOINT");
startActivity(openStartingPoint);
}
}
};
timer.start();
}
@Override
protected void onPause() {
// TODO Auto-generated method stub
super.onPause();
ourSong.release();
finish();
}
}