iOS Question Media Player does not work in ios 7

Discussion in 'iOS Questions' started by Ramezanpour, Mar 18, 2015.

  1. Ramezanpour

    Ramezanpour Active Member Licensed 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?
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Can you post your code?
     
  3. Ramezanpour

    Ramezanpour Active Member Licensed User

    Code:
    '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
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    I've just tested it on iOS 7 with this code:
    Code:
    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.
     
    Ramezanpour likes this.
  5. Ramezanpour

    Ramezanpour Active Member Licensed User


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

    This device ios 7 is a Ipad mini and is Jailbreak
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice