Firstly I should add that the tablet I am using for my Grandson is running Android 4.4 don't know if that would make a difference, but the MP4 file plays with the default video player so I know thats okay.
I've changed the code to use the default file location, after finding where the app resides I moved the mp4 file to the files folder in the hope it would solve the problem, but it doesn't, the file still doesn't play
I've watched the tutorial and i'm nearly sure you state I don't need and permissions at runtime if I'm using the default file location, anyway here is my simple code, I would greatly appreciate if you could tell me where I'm going wrong, or it isn't possible, many thanks
Sub Process_Globals
Private player1 As SimpleExoPlayer
Public MP4Text As String
End Sub
Sub Globals
Private button1 As Button
Private SimpleExoPlayerView1 As SimpleExoPlayerView
Private Label1 As Label
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("main")
'Log(File.DirDefaultExternal)
'Label1.Text=File.DirDefaultExternal
player1.Initialize("player")
End Sub
Sub button1_click
Dim DirName As String
MP4Text="MrTumble.mp4"
player1.CreateFileSource(File.DirDefaultExternal,MP4Text)
SimpleExoPlayerView1.Player = player1
player1.Play
End Sub
Just to add, I've tried it on an up to date android tablet using android 7 and it still doesn't work, also here is my Manifest
AddManifestText(
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="26"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
CreateResourceFromFile(Macro, Themes.DarkTheme)
AddPermission(android.permission.WRITE_EXTERNAL_STORAGE)
hope that helps