c# - Using ALAssetsLibraryChangedNotification in background with Xamarin iOS -
I'm writing an app that targets iOS7 in Xamarin.iOS, which will soon send photos of users an online storage service Wants to upload it as if it takes them away. To do this, I established an Alasset Library Converted Notification Supervisor, such as:
NSNotificationCenter.DefaultCenter.AddObserver (ALAssetsLibrary.ChangedNotification, Callback);
and then define a callback like this:
zero callback (nestation information) {console. WrightLine ("Library Notification Received: {0}", Notification); // launch picture upload here}
This works well, but only open with the app. Is my app a way to get notification (and uploading process) when it is turned into background? I use the iOS 7 background for file transfers and long-running tasks in other points of my app, but I do not know how to implement the supervisor. Additional questions, I would also like to be able to filter the notifications received by this function so that I can only upload my upload when the operation "new photo was created" (currently I get notifications when the pictures are deleted / edited Are). Thanks in advance for your reply :)
Comments
Post a Comment