Greg M
Greg M

Reputation: 37

Job Scheduling Service

I want to have a listener or a service which runs when a user takes a photo or video. That service then goes and finds the URI of the image/video the user takes, and records information about it. Previously I used a BroadcastListener, listening for the intent ACTION_NEW_PICTURE. However, in https://developer.android.com/about/versions/nougat/android-7.0-changes.html they deprecated this and suggest to use a JobScheduler instead. I haven't found any simple examples of JobScheduler being implemented within Xamarin so if somebody could explain how they would work in my scenario that would be ideal. The condition that would need to be met for a job to be processed would be if the URI of the photo location changes, therefore I'm guessing there is a need for a content observer.

Upvotes: 1

Views: 474

Answers (1)

Kushan
Kushan

Reputation: 1260

A little late to the party, but I hate unanswered questions.

There's now an example on the Xamarin site of how to use the Job Scheduler:

https://developer.xamarin.com/samples/monodroid/android5.0/JobScheduler/

Upvotes: 1

Related Questions