Questions tagged [interruption]

126 questions
5
votes
3 answers

AudioUnitInitialize failed with error code 1701737535 'ent?' after alarm interruption

I am working with VOIP app. The app is working fine with CallKit. I am facing an issue if alarm fires within call. Every time when alarm stop firing (Audio Interruption ends), we are trying to setActive: on AVAudioSession. But it always gives an…
5
votes
1 answer

How to catch cancallation of UIScrollView or others?

Sometimes, interruptions such as phone call occur and disturb a regular behavior of an app in iPhone or iPad. For example, I created one UIScrollView instance and implemented UIScrollView delegate methods: scrollViewWillBeginDragging and…
pnmn
  • 1,127
  • 1
  • 14
  • 22
5
votes
2 answers

How to get interruption start/end events for AVPlayer

I am playing audio files with AVPlayer. I implemented AVAudioSessionInterruptionNotification. AVAudioSession *session = [AVAudioSession sharedInstance]; NSError *errorInAudio = nil; [session setActive:YES error:&errorInAudio]; …
Tinku George
  • 195
  • 2
  • 11
4
votes
0 answers

Is AdMob Banner Ad in my iOS app interrupting background audio from other apps?

I noticed a problem with my iOS app where audio playing from other apps (e.g. Podcast app) sometimes stops while my app is active. My app does not play any audio (it is quiet) and I would like background audio from other apps to continue to play…
omSoft
  • 41
  • 2
4
votes
4 answers

Why must I wrap every Thread.sleep() call in a try/catch statement?

I am trying to write my first multi-threaded program in Java. I can't understand why we require this exception handling around the for loops. When I compile without the try/catch clauses it gives an InterruptedException. Here is the…
Sergio Gliesh
  • 329
  • 1
  • 2
  • 8
4
votes
1 answer

Firebase storage handling network interruptions when download in progress

I am trying to download some files from the firebase storage. It works well when there is stable internet connection. But if the internet connection is lost while downloading the content halfway, it just keeps trying to download the content. How to…
Abdul Rahman
  • 1,833
  • 1
  • 21
  • 21
4
votes
2 answers

Can read() fail with EINTR when reading from regular file

Is far as I remember, read() cannot be interrupted by a signal and return with errno=EINTR when reading from a regular file, and likewise for write() when writing to a regular file. That is opposed to reading from, or writing to terminals, pipes,…
Kristian Spangsege
  • 2,903
  • 1
  • 20
  • 43
4
votes
1 answer

When to use HANDLE_EINTR or HANDLE_EAGAIN?

I'm writing a web server in C and I often use system calls that on error return -1 and set "errno" variable an appropriate value. Some system calls can return EINTR and/or EAGAIN. I have two wrappers HANDLE_EINTR, HANDLE_EAGAIN that use both these…
4
votes
3 answers

Thread Interruption in java

I want some clarification on thread interruption. What if a thread goes a long time without invoking a method that throws anInterruptedException? Then it must periodically invoke Thread.interrupted, which returns true if an interrupt has been…
KarimS
  • 3,812
  • 9
  • 41
  • 64
4
votes
2 answers

Resuming an app running in background after a phone call ios

I have an ios app that continues to play music when it moves into background. Now, if there is a phone call, answered or not, the app does not resume to play music. For two days i ve been reading posts about this problem here.None of them solved my…
Abhishek Arora
  • 395
  • 2
  • 12
4
votes
1 answer

AVAudioSessionInterruptionNotification not triggered when capture device active

I'm having a problem with "AVAudioSessionInterruptionNotification" on iOS 7.0.4. I sign up for it on the NSNotificationCenter, and I activate AVAudioSession. Everything works fine, but if a camera is activated, that particular notification is not…
Axel83
  • 197
  • 2
  • 13
4
votes
2 answers

App with AVPlayer plays mp4 interrupt iPod music after launched

My App plays mp4 using AVPlayer, when my application finish launching, it interrupt the iPod music, although I have set the audio session to allow mix with others in - (BOOL)application:(UIApplication *)application…
nova
  • 781
  • 11
  • 17
3
votes
1 answer

Do interrupts exist in python?

Can you write interrupts in python which can trigger and break program flow as a result of some external event? In particular suppose you have a thread doing a computation, you want that computation to break and divert program flow to some function…
FourierFlux
  • 439
  • 5
  • 13
3
votes
2 answers

Stoppable Java console progressbar

I am looking for a way to stop the progress of the following bar: private static void cancellaaaaaaaaable() throws InterruptedException { System.out.println("Cancellaaaaaaable!"); System.out.print(ANSI_RED); for(int i = 0; i < 79; i++){ …
shogitai
  • 1,823
  • 1
  • 23
  • 50
3
votes
4 answers

Is this example code just facile or would there be a reason here to use interrupt()

I'm reading Goetz's Java Concurrency In Practice where this example code is shown: public final class Indexer implements Runnable { private final BlockingQueue queue; public Indexer(BlockingQueue queue) { this.queue =…
Adam
  • 5,215
  • 5
  • 51
  • 90
1
2
3
8 9