iOS Question Media Player does not work in ios 7

Ramezanpour

Active Member
Licensed User
Longtime User
Hi
media player does not work in ios 7


i install my app into my iphone and it work and then install it on ipad air and again work ! (ios 8.2)

But in my ipad mini with ios 7 does not work (the sound does not play)

What is the problem?
 

Ramezanpour

Active Member
Licensed User
Longtime User
Can you post your code?
B4X:
'Code module

Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'Public variables can be accessed from all modules.
Dim pg As Page
    Private play As ImageView
    Private Label1 As Label
    Private Label2 As Label
   
    Dim mp As MediaPlayer
End Sub


Public Sub Show
   If pg.IsInitialized = False Then
     pg.Initialize("pg")
     pg.RootPanel.LoadLayout("test")
     pg.HideBackButton = True '<-- don't want to allow the user to return to the login screen
   End If
  
Main.NavControl.ShowPage(pg)

mp.Initialize(File.DirAssets,"8.mp3","mp")
mp.Looping= False
mp.play

Label1.Text= "8"
Label2.Text = "Lavel8"

End Sub
Sub re_Click
    mp.play
End Sub
Sub yes_Click
    Menu.all = Menu.all +1
    mp.stop
    f.Show
End Sub
Sub no_Click
    mp.stop
    f.Show
End Sub
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I've just tested it on iOS 7 with this code:
B4X:
Sub Process_Globals
   Public App As Application
   Public NavControl As NavigationController
   Private Page1 As Page
   Private mp As MediaPlayer
End Sub

Private Sub Application_Start (Nav As NavigationController)
   NavControl = Nav
   Page1.Initialize("Page1")
   NavControl.ShowPage(Page1)
   mp.Initialize(File.DirAssets, "01.mp3", "mp")
   mp.Looping = True
   mp.Play
End Sub
It worked properly.

Try to switch to a different audio file and also try it with a new project with this code.
 
Upvote 0

Ramezanpour

Active Member
Licensed User
Longtime User
I've just tested it on iOS 7 with this code:
B4X:
Sub Process_Globals
   Public App As Application
   Public NavControl As NavigationController
   Private Page1 As Page
   Private mp As MediaPlayer
End Sub

Private Sub Application_Start (Nav As NavigationController)
   NavControl = Nav
   Page1.Initialize("Page1")
   NavControl.ShowPage(Page1)
   mp.Initialize(File.DirAssets, "01.mp3", "mp")
   mp.Looping = True
   mp.Play
End Sub
It worked properly.

Try to switch to a different audio file and also try it with a new project with this code.


It looks like it is
And I do not think anything different.

This device ios 7 is a Ipad mini and is Jailbreak
 
Upvote 0
Top