Skip to content

Commit c9e0d4d

Browse files
committed
Merge branch 'master' of github.com:bmeike/ProgrammingAndroid2Examples
2 parents e845d2a + fb4a829 commit c9e0d4d

File tree

6 files changed

+14
-15
lines changed

6 files changed

+14
-15
lines changed

AudioPlayer/AndroidManifest.xml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
package="com.oreilly.demo.android.pa.audioplayer"
44
android:versionCode="1"
55
android:versionName="1.0">
6+
7+
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
8+
<uses-permission android:name="android.permission.RECORD_VIDEO"/>
9+
<uses-permission android:name="android.permission.INTERNET"/>
10+
<uses-permission android:name="android.permission.CAMERA"/>
11+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
12+
<uses-sdk android:targetSdkVersion="14"></uses-sdk>
13+
614
<application android:icon="@drawable/icon" android:label="@string/app_name">
715
<activity android:name=".MultiMedia"
816
android:label="@string/app_name">
@@ -19,14 +27,7 @@
1927
<activity android:name=".AudioRecorderViaIntent" android:label="Audio Recorder By Intent"/>
2028
<activity android:name=".VideoRecorder" android:label="Video Recorder"/>
2129
<activity android:name=".AudioRecorder" android:label="Audio Recorder"/>
22-
<activity android:name="com.oreilly.demo.android.pa.audioplayer.AudioRecorderWAudioRecord" android:label="Audio Recorder W AudioRecord"/>
30+
<activity android:name=".AudioRecorderWAudioRecord" android:label="Audio Recorder W AudioRecord"/>
2331
</application>
24-
25-
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
26-
<uses-permission android:name="android.permission.RECORD_VIDEO"/>
27-
<uses-permission android:name="android.permission.INTERNET"/>
28-
<uses-permission android:name="android.permission.CAMERA"/>
29-
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
30-
<uses-sdk android:targetSdkVersion="14"></uses-sdk>
3132

3233
</manifest>

AudioPlayer/README.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ This example must be run on actual hardware (not an emulator)
22
as this contains hardware specific code.
33

44

5-
(This was tested on a Nexus One and Nexus S phones)
5+
(This was tested on a Nexus One, Nexus S, Galaxy Nexus phones)

AudioPlayer/TODO

Lines changed: 0 additions & 2 deletions
This file was deleted.

AudioPlayer/project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
# project structure.
99

1010
# Project target.
11-
target=android-14
11+
target=android-15

AudioPlayer/src/com/oreilly/demo/android/pa/audioplayer/AudioPlayer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,8 @@ private void playPlayer(int previousState) {
203203
}
204204

205205
private void stopPlayer() {
206-
mediaplayer.stop();
207-
mediaplayer.reset();
206+
try { mediaplayer.stop(); } catch (Throwable t) {}
207+
try { mediaplayer.reset(); } catch (Throwable t) {}
208208
initializeMediaPlayer();
209209
}
210210

AudioPlayer/tools/ide/classpath

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<classpath>
33
<classpathentry kind="src" path="src"/>
4-
<classpathentry kind="src" path="gen"/>
54
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
5+
<classpathentry kind="src" path="gen"/>
66
<classpathentry kind="output" path="bin/classes"/>
77
</classpath>

0 commit comments

Comments
 (0)