Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-19633

iOS: AUDIO_SESSION_CATEGORY_AMBIENT stops background music

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: Release 4.1.1
    • Fix Version/s: Release 5.2.0
    • Component/s: iOS
    • Labels:
    • Environment:

      iOS
      Titanium 3.5.1 (It should affect > 3.5.0 GA)

    • Story Points:
      2
    • Sprint:
      2015 Sprint 20 SDK

      Description

      This command stops iPod music, while it shouldn't.

      Ti.Media.audioSessionCategory = Ti.Media.AUDIO_SESSION_CATEGORY_AMBIENT;

      Someone found a workaround for this, see this link

      Summarized:

      >>I ended up solving this problem by editing TiApp.m on the SDK and adding the following code to didFinishLaunchingWithOptions:

      NSError *setCategoryError = nil;
      BOOL audioOk = [[AVAudioSession sharedInstance]
      setCategory: AVAudioSessionCategoryAmbient
      error: &setCategoryError];

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                apetkov Angel Petkov
                Reporter:
                nsndvd Davide Ensini
                Reviewer:
                Chee Kiat Ng (Inactive)
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-20433
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code