A AlexMaa Member Licensed User Longtime User May 8, 2016 #1 In Android 4.x - work Code: Copy Dim rtManager As RingtoneManager Dim mp As MediaPlayer mp.Initialize mp.Load(rtManager.GetContentDir, rtManager.GetDefault(rtManager.TYPE_RINGTONE)) mp.Play In Android 5.2 - does not work ! java.io.FileNotFoundException: Direct file access no longer supported; ringtone playback is available through android.media.Ringtone Click to expand... what to do?
In Android 4.x - work Code: Copy Dim rtManager As RingtoneManager Dim mp As MediaPlayer mp.Initialize mp.Load(rtManager.GetContentDir, rtManager.GetDefault(rtManager.TYPE_RINGTONE)) mp.Play In Android 5.2 - does not work ! java.io.FileNotFoundException: Direct file access no longer supported; ringtone playback is available through android.media.Ringtone Click to expand... what to do?
Erel B4X founder Staff member Licensed User Longtime User May 9, 2016 #2 You should use RingtoneManager.Play to play the sound. Upvote 0
A AlexMaa Member Licensed User Longtime User May 9, 2016 #3 I use version b4a 4.30 - this version I was completely satisfied. switch to version 5.x does not want. (Besides, I do not remember on what version I have ended support) 4.30 in phone.jar no method RingtoneManager.Play. Can I use phone.jar from 5.x to version 4.3. or a conflict license? ---- Excuse me, English is not my native language Last edited: May 9, 2016 Upvote 0
I use version b4a 4.30 - this version I was completely satisfied. switch to version 5.x does not want. (Besides, I do not remember on what version I have ended support) 4.30 in phone.jar no method RingtoneManager.Play. Can I use phone.jar from 5.x to version 4.3. or a conflict license? ---- Excuse me, English is not my native language
Erel B4X founder Staff member Licensed User Longtime User May 10, 2016 #4 I recommend you to upgrade to the latest version of B4A. There were many improvements related to the material theme (and in other areas as well). You can use the code I posted here instead: https://www.b4x.com/android/forum/threads/default-message-sound.56476/#post-355337 Upvote 0
I recommend you to upgrade to the latest version of B4A. There were many improvements related to the material theme (and in other areas as well). You can use the code I posted here instead: https://www.b4x.com/android/forum/threads/default-message-sound.56476/#post-355337