background-process

How to make JavaScript run at normal speed in Chrome even when tab is not active?

▼魔方 西西 提交于 2019-12-07 06:46:03
问题 I've noticed a problem with my webapp - when Chrome active tab isn't set to my app, Chrome stops running my JS code until I open tab again. I guess it does to save CPU cycles. Else if you've 20 tabs open and each has code running, it will get slow quickly. This is all good, but my app requires that it keeps running in the background. It updates graphs in real time and analyses data every few seconds. If I move to another tab, graph updating and analysis stops (or becomes very slow - 1 second

Geofence iOS8 : Require Background Mode for iOS Geofencing [closed]

我与影子孤独终老i 提交于 2019-12-07 06:27:25
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I have used geofencing in my app. Geofence feature discription: App has two type of functionality while entering or exiting from the region: Reset fence: If user will enter in the region and that region has the functionality of reset fence then app will call one web-service and get the new fence list. This

Background sync in iOS7

≡放荡痞女 提交于 2019-12-07 04:23:15
问题 We have to develop an app which will support data sync operations at some time interval, whether the app is in foreground or in background. I want to know that in iOS7… is it possible to sync data (i.e. call web services) while the app is in background? can we access SQLite data base file/can we do DB operations while the app is in background? can we run timers in background? can we show alerts about some updates while the app is in background? Thanks in advance. 回答1: Yes, it is. Yes, you can

PHP background process

半城伤御伤魂 提交于 2019-12-07 02:05:41
问题 I've wrote a php irc bot, but i need it to work in the background. With this there'd be no quits or so. What is the best way to do this? Thanks and Regards. 回答1: Take a look at the following website. There is a pretty descend explanation on how to write PHP daemons. http://kevin.vanzonneveld.net/techblog/article/create_daemons_in_php/ 回答2: Run it in screen, then detach. You can then quit the terminal and re-attach to the screen session later. 回答3: I use something similar: nohup php /path/to

Is it legal to create a recursive background handler in iphone?(processing when app enters the background)

柔情痞子 提交于 2019-12-06 16:34:13
问题 If I register an app for background app in did enter background and make a background handler with approximately 10 mins to finish the task, after the time is over the handler will call finishing block and in this block again create the background handler you will get again 10 mins and so on, in this way application will remain in background. I mean is it OK to do that....? or will apple object to this? 回答1: From the documentation: Applications running background tasks have a finite amount of

iPhone VOIP in background

耗尽温柔 提交于 2019-12-06 14:32:29
问题 I am developing an iPhone application that communicates with a non iOS device through Wi-Fi. My application is using VOIP.I have configured the streams and added the necessary UIBackgroundModes into my plist . The problem is that the application is not receiving any information from the external device, When it enters in background. Could somebody tell me if I am missing something? 回答1: Not sure about actual problem. Make sure following As per iOS background VOIP application it will allow

Pass a variable from foreground to background in Swift

我怕爱的太早我们不能终老 提交于 2019-12-06 14:19:26
I am developing an iOS application where I want to record the time when a user presses a particular button and keep it. Later I will use this time record in background. Is there a nice way of doing that without invoking NSUserDefaults or CoreData or whatever other database? I am very new to iOS development. I think this is very likely to be a naive question. But I'm just curious. Please don't laugh at me haha. Edit: This is indeed a very naive question haha. A simple way to make sure your data is available everywhere in your app and only persists for each app session would be to use a

How to make an android app run in background when the screen sleeps?

僤鯓⒐⒋嵵緔 提交于 2019-12-06 13:53:40
问题 I am developing a Tracking app, which keeps tracks of the user by getting his current location for every 3 secs. I am able to fetch the lat long values when the screen is on. but when the screen sleeps. i am unable to fetch the datas. CODE: @Override public void onLocationChanged(Location location) { mLastLocation = location; if (mCurrLocationMarker != null) { mCurrLocationMarker.remove(); } latitude = location.getLatitude(); longitude = location.getLongitude(); latLngcurrent = new LatLng

Intermittent data loss with background fetch - could NSKeyedUnarchiver return nil from the documents directory?

╄→尐↘猪︶ㄣ 提交于 2019-12-06 13:51:36
问题 I have a simple app that stores an array of my custom type (instances of a class called Drug ) using NSCoding in the app’s documents folder. The loading and saving code is an extension to my main view controller, which always exists once it is loaded. Initialisation of array: var drugs = [Drug]() This array is then appended with the result of the loadDrugs() method below. func saveDrugs() { // Save to app container let isSuccessfulSave = NSKeyedArchiver.archiveRootObject(drugs, toFile: Drug

Android / iOS - BLE - wake up a terminated application when a BLE device connects

て烟熏妆下的殇ゞ 提交于 2019-12-06 13:48:59
问题 Iam creating an iOS and an Android application that read some data from a bluetooth sensor and saves them in a db. I want to give the ability to save the sensor's data even when the application is terminated. fyi. I have already managed to read the sensor in both iOS and Android while the app is the background. But my concern is on how to make the following scenario work: -Sensor is disconnected from the phone -User terminates the application from the task manager -User connects (and pairs)