background-process

Time based GPS location in background (iphone)

我的未来我决定 提交于 2019-12-01 11:20:51
I want to create an (game based) iPhone application which sends your GPS location on a specific time (like 3-5 times a day) to a server. I found an apple page explaining some functionality to run in the background like location, music and VOIP. I need the GPS to be accurate on the meter. Can someone help me with a small example? It really depends on your usage of the location. If you monitor actively, kiss the battery of your user goodbye. Very detailed accuracy, even bigger hit to battery. The backgrounding of location is all or nothing as far as accuracy goes. Less hit, less accuracy is

How to “fork” a video conversion process into background, in php?

对着背影说爱祢 提交于 2019-12-01 10:55:38
I have a batch flash upload script, that uploads video files to a dir. Simple. After the upload completes, it creates a mysql record for that file, and moves on to the next file in the queue. Just before it does that, I want it invoke a background process that will convert the uploaded avi avi file to an ipod compatible mp4 file, as well as generate some preview thumbs. As you can imagine, it takes some time...... I can simply put the conversion code in the file uploader... but it would hang for every file for a good 10-20 minutes, which is a nono (even thou its an admin-only function). So I

Service of an app stops when phone is not being charged

旧街凉风 提交于 2019-12-01 09:51:54
问题 My Activity starts a service by calling startservice() . To simplify my problem lets say the service will be a counter, and the counter will be increased in every 10 sec. Timer t_counter; int counter = 0; @Override public int onStartCommand(Intent intent, int flags, int startId) { t_counter = new Timer(); t_counter.schedule(new TimerTask() { @Override public void run() { counter++; Log.d("counter: ",Integer.toString(counter)); }}, 0, 10000); return Service.START_STICKY; } When the phone is

Problem while Working in background and Nstimer?

ぃ、小莉子 提交于 2019-12-01 09:05:18
问题 Hi i have atask to develop the application with Nstimer and background process. I have already implement background process with timer. And it is excuting good.but i have problem when i minimize application first time at that time it is not running the background process. after minimizing application 3 to 4 times. After that it is working smoothly. i also display the code of background task and timer as follow. - (void)applicationDidEnterBackground:(UIApplication *)application { UIApplication

How to “fork” a video conversion process into background, in php?

瘦欲@ 提交于 2019-12-01 08:35:06
问题 I have a batch flash upload script, that uploads video files to a dir. Simple. After the upload completes, it creates a mysql record for that file, and moves on to the next file in the queue. Just before it does that, I want it invoke a background process that will convert the uploaded avi avi file to an ipod compatible mp4 file, as well as generate some preview thumbs. As you can imagine, it takes some time...... I can simply put the conversion code in the file uploader... but it would hang

Time based GPS location in background (iphone)

天大地大妈咪最大 提交于 2019-12-01 08:25:39
问题 I want to create an (game based) iPhone application which sends your GPS location on a specific time (like 3-5 times a day) to a server. I found an apple page explaining some functionality to run in the background like location, music and VOIP. I need the GPS to be accurate on the meter. Can someone help me with a small example? 回答1: It really depends on your usage of the location. If you monitor actively, kiss the battery of your user goodbye. Very detailed accuracy, even bigger hit to

Gearman addTaskBackground complete Callback doesnot fire

泪湿孤枕 提交于 2019-12-01 08:20:37
问题 I am trying to make some job in background and write result to file result from complete callback, but its only work for addTask (not in background) and not for addTaskBackground have somebody any ideas? thanks for help! $client = new GearmanClient(); $client->addServer('localhost'); $client->setCompleteCallback("complete"); $client->addTaskBackground('upload', 'http://youtube.com/watch?v=o3mP3mJDL2k', null, 1); $client->addTaskBackground('upload', 'http://www.youtube.com/watch?v=SgAVnlnf8w0'

HealthKit data inaccessible in background

試著忘記壹切 提交于 2019-12-01 03:42:13
I want to pull HealthStore data in the background using background fetch but I keep getting an error: Error Domain=com.apple.healthkit Code=6 "Protected health data is inaccessible" UserInfo=0x17026fdc0 {NSLocalizedDescription=Protected health data is inaccessible} . Apple states: Because the HealthKit store is encrypted, your app cannot read data from the store when the phone is locked. This means your app may not be able to access the store when it is launched in the background. Any workaround to access data in the background? Is the HKObserverQuery the only way to get data in the background

Receiving broadcast from notification on Android Oreo

吃可爱长大的小学妹 提交于 2019-12-01 02:59:31
I have a custom button in a sticky notification. I used to attach a PendingIntent to it for receiving button clicks: Intent intent = new Intent(); intent.setAction("com.example.app.intent.action.BUTTON_CLICK"); PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 2000, intent, PendingIntent.FLAG_UPDATE_CURRENT); contentViewExpanded.setOnClickPendingIntent(R.id.button, pendingIntent); When i run this code on Oreo , i get BroadcastQueue: Background execution not allowed in logcat and don't receive button click. I registered receiver with manifest: <receiver android:name="

HealthKit data inaccessible in background

。_饼干妹妹 提交于 2019-12-01 01:07:03
问题 I want to pull HealthStore data in the background using background fetch but I keep getting an error: Error Domain=com.apple.healthkit Code=6 "Protected health data is inaccessible" UserInfo=0x17026fdc0 {NSLocalizedDescription=Protected health data is inaccessible} . Apple states: Because the HealthKit store is encrypted, your app cannot read data from the store when the phone is locked. This means your app may not be able to access the store when it is launched in the background. Any