Questions tagged [background-mode]
99 questions
1
vote
0 answers
Play Ionic/Cordova media in background
I'm starting with Ionic 4 and I try to create and app which can play media(streams) like youtube in the background.
I used the Ionic Youtube Video Player and Background Mode like this in my home.page.ts:
import { Component } from…

cumul
- 864
- 9
- 21
1
vote
1 answer
Silent notification on background mode does not work iOS
I am using One Signal to receive notifications. Also Native Swift 4.2 on Xcode.
I need to send silent notifications to my app, just to update data. I don't want to bother the user.
Ok, I can do that on foreground. But I cannot on background.
Some of…

asr
- 139
- 3
- 11
1
vote
1 answer
Monitor app and lock state changes in the background on iOS
I’m trying to make a focus timer app like Forest, that detects if you leave the app, either by going to the home screen, switching to another app or by first locking the phone and later proceeding to a different app through notifications, widgets,…

humanedesign
- 11
- 1
1
vote
2 answers
Get location updates in background - only for Country change iOS
What is the best way in core location to get background location updates only when there is change in country?

Kalai
- 11
- 1
1
vote
0 answers
iOS background fetch keeps launching the app
I'm working on an iOS application which had Background Fetch enabled via the Info.plist for around a year. There were multiple versions released with background fetch enabled, but then a few weeks ago the feature that necessitated background fetch…

Tamás Zahola
- 9,271
- 4
- 34
- 46
1
vote
1 answer
Ionic2 backgroundMode not working with internet connection in sleep mode
I've created a Ionic2 application that needs to post and get data from a API online. This needs to happen even when the app is in background mode or the device is asleep. I've installed…

Jamie Barker
- 163
- 1
- 15
1
vote
0 answers
Swift iOS Geofence from Background
what is the best way to refresh geofence regions in background?
At the moment i use location service with background mode always.
I try to grab the userlocation and compare the distance to an initial saved location. When the user moved a distance…

Peter Sypek
- 151
- 2
- 12
1
vote
0 answers
What's the difference between UIBackgroundTaskInvalid and endBackgroundTask?
I sometimes see code where the task is ended using
bgTaskID = UIBackgroundTaskInvalid
At other places I see
UIApplication.sharedApplication().endBackgroundTask(bgTaskID)
At some other places I see:
…

mfaani
- 33,269
- 19
- 164
- 293
1
vote
1 answer
bluebar stays forever even if stopupdating is called in iOS 11
I am accessing location services as 'always', i know all the changes made by apple in iOS 11. i updated my plist as required( added new key). I calling stopUpdatingLocation as soon as application goes to the background, but this blue still stays…

Siddhesh Mahadeshwar
- 1,591
- 14
- 16
1
vote
0 answers
play audio in background on intervals iOS
So I am working on an app that requires different audio files to be played using an NSTimer every X amount of time. Yes, it needs to play the audio in the background as well, but I have had inconsistent results trying to do so. I have searched the…

Zachary Makar
- 21
- 2
1
vote
2 answers
How can I know my app is working in background?
I have written this program, it is work when the app is displaying on screen
If the app in background, it stop to print the latitude, when I resume the app, it will start to print again.
I have enabled background modes in xcode, and also checked…

CL So
- 3,647
- 10
- 51
- 95
1
vote
0 answers
iOS 10 - App is not working in background mode after 3 minutes
I am connecting an external bluetooth peripheral to iPhone 5S(iOS 10.0.1).
Peripheral sends data at every 2 seconds.
After 4 minutes(approx), peripheral goes idle & app will not receiving data from peripheral.
When I put app in background when…

Minhaz Panara
- 59
- 8
1
vote
1 answer
How to handle remote notification with background mode enabled
I build and app that has Background Modes enabled, and the push notification payload that the app gets has "content-available" key.
This setup results in didReceiveRemoteNotification being called EVERY TIME the app gets a push notification, which…

Tim Friedland
- 1,045
- 11
- 18
1
vote
0 answers
Get User Location Every 5 minutes with background modes in Swift 3
I want to ;
Get User Location Every 5 minutes with background modes in Swift 3
But my codes don't any action. I need to get and send server ,longitude , latitude , and altitude values every 5 minutes
My codes under below.
AppDelegate.swift
func…

SwiftDeveloper
- 7,244
- 14
- 56
- 85
1
vote
0 answers
How do I perform some code after app was connected to the internet and is in the background mode?
In didFinishLaunchingWithOptions I do:
AFNetworkReachabilityManager.shared().startMonitoring()
NotificationCenter.default.addObserver(self, selector: #selector(networkDidChangeStatus), name: NSNotification.Name.AFNetworkingReachabilityDidChange,…

Bartłomiej Semańczyk
- 59,234
- 49
- 233
- 358