Skip to content

Commit 2b1e615

Browse files
issue: MediaPlayer Couldn't open content
1 parent 09a2857 commit 2b1e615

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

android/src/main/java/com/incomingcall/UnlockScreenActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class UnlockScreenActivity extends AppCompatActivity implements UnlockScr
3838
static boolean active = false;
3939
private static Vibrator v = (Vibrator) IncomingCallModule.reactContext.getSystemService(Context.VIBRATOR_SERVICE);
4040
private long[] pattern = {0, 1000, 800};
41-
private static MediaPlayer player = MediaPlayer.create(IncomingCallModule.reactContext, Settings.System.DEFAULT_RINGTONE_URI);
41+
private static MediaPlayer player = MediaPlayer.create(IncomingCallModule.reactContext.getApplicationContext(), Settings.System.DEFAULT_RINGTONE_URI);
4242
private static Activity fa;
4343

4444
@Override

0 commit comments

Comments
 (0)