background-task

WP8.1 C# Windows Phone 8.1 Background Task WriteableBitmap Thread Error

佐手、 提交于 2019-12-16 18:04:47
问题 I am trying to update the band Me Tile image from a background task and i get the following error at WriteableBitmap: System.Exception: The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD)) at Windows.UI.Xaml.Media.Imaging.WriteableBitmap..ctor(Int32 pixelWidth, Int32 pixelHeight) at BackgroundTaskCS.UpdateBandTask.<LoadImage>d__f.MoveNext() --- End of stack trace from previous location where exception was

Azure MobileService in BackgroundTask

百般思念 提交于 2019-12-12 18:25:08
问题 My question is pretty simple : Can we use MobileServices in BackgroundTasks? (WP 8.1 XAML) I have an universal app connected to a MobileService from Azure and I wanted to let the BackgroundTask synchronize the data of my remote database. So, is this possible? public sealed class BackgroundTask : IBackgroundTask { public async void Run(IBackgroundTaskInstance taskInstance) { BackgroundTaskDeferral deferral = taskInstance.GetDeferral(); //Connect to mobile service and add data deferral.Complete

Execute VBS from Nodejs in background mode (Tasks Scheduler or Windows Service)

亡梦爱人 提交于 2019-12-11 18:42:55
问题 I'm trying to convert an Excel File to PDF from a NodeJS App. It works when I start Node in command line, but when I start my app.bat as Windows Service through NSSM or directly with the Tasks Scheduler, it doesn't work anymore. With the script bellow, I can only see the first row in the log.txt which is the program arguments. If everything was going well, I should see 0, then 1, and 2. Sadly, when Node runs in background, I don't have any number, so i'm guessing the problem is CreateObject(

Background agent doesn't run when battery saver mode is on

早过忘川 提交于 2019-12-11 12:11:42
问题 I'm using a PeriodicTask that works flawlessly, but it doesn't run if the battery saver mode is on, even though I've allowed the app to run in the background in this state via the Battery Saver app. Any ideas what may be causing it from not running? I should add that I'm generating a new front and back live tile image using Telerik's LiveTileHelper control inside the background agent, and that a http request is made too (the app is a weather app). This is for a Silverlight Windows Phone 8 app

Call MediaCapture.InitializeAsync from UWP BackgroundTask

依然范特西╮ 提交于 2019-12-11 11:37:58
问题 I am trying to take a photo during a BackgroundTask at an UWP application. I read at documentation that InitializeAsync should be on the STA thread but is there some approach to achieve that from a MTA? I don't known, something like Dispatchers or others workarounds. In my actual scenario, when I call CapturePhotoToStreamAsync just after the InitializeAsync, the following exception occurs: System.Runtime.InteropServices.COMException (0xC00D3E82): A media source cannot go from the stopped

Update LiveTile from Background Task WP8.1

拟墨画扇 提交于 2019-12-11 02:43:46
问题 I cannot update manually pinned tile from Background Task. var updater = TileUpdateManager.CreateTileUpdaterForApplication(); updater.EnableNotificationQueue(true); updater.Clear(); XmlDocument tileXml = TileUpdateManager.GetTemplateContent(TileTemplateType.TileWideText03); var title = "Test text"; string titleText = title == null ? String.Empty : title; tileXml.GetElementsByTagName("text")[0].InnerText = titleText; updater.Update(new TileNotification(tileXml)); Exception fires on

Job Scheduling setRequiresDeviceIdle(true) and setPeriodic() not working

你说的曾经没有我的故事 提交于 2019-12-10 15:23:09
问题 I am working on app that do the background task after 10 second and check whether device is idle or not but some how It fires every 10 second without checking Device is idle or not. MainActivity.java private static final int JOB_ID = 1; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mJobScheduler = (JobScheduler) getSystemService(this.JOB_SCHEDULER_SERVICE); construct_job(); } private void construct

Call a web service from iOS at a particular time daily in the background

若如初见. 提交于 2019-12-09 01:52:41
问题 Is there a way to schedule a function which calls a web service at a particular time on a daily basis? According to my research, I will have to use local notifications or NSTimer to schedule or call the function at a specific time. But I need this to work whether my application is in the background at the schedule time (and not running any background task), or in the foreground. There are two cases: 1. Location service is running in the background in my application 2. No location or

Windows Phone background task stops prematurely

与世无争的帅哥 提交于 2019-12-08 19:12:18
问题 I'm developing a WP8.1 SL app which uses background tasks (not agents!). My task is triggered by a TimerTrigger - once every 30 minutes (which I believe is the minimum interval for Windows Phone, right?). It is doing a lot of work, and for some reason, sometimes it gets interrupted - that is, it stops in the middle of it. The way I know it's in the middle of it is because I log what's happening and the task's work is basically the same every time. I deployed the app to my device yesterday to

Count while in background (NSTimer for more than 3 mins)

别等时光非礼了梦想. 提交于 2019-12-08 07:46:43
问题 Is there any way to run NSTimer for more than 3 mins in background? I have to create simple app that uses `locationManager(manager: CLLocationManager, didRangeBeacons beacons: [CLBeacon], inRegion region: CLBeaconRegion)` for scan my beacons. I have run into problem when I needed to check if user is exactly 10 seconds near closest beacon. I created var timer: NSTimer? var lastClosestBeacon: CLBeacon? { didSet { timer?.invalidate() timer = NSTimer.scheduledTimerWithTimeInterval(10, target: