I would like to use this library in Xamarin.Android to cater for all the different Android versions. Now with Android 'O' rejecting the 'StartService(...)' method, It is needed to implement this project and to save battery power.
I don't have any experience with Xamarin, so I can't help you, sorry. Stackoverflow might be a better place to ask this question.
I will attempt at converting it to Xamarin.Android. Thank you
Okay, I have successfully created a Xamarin.Android dll.
Cmd > gradlew build > Successful
Follow these instructions:
classes.jar file in ..\library\build\intermediates\intermediate-jars\release\classes.jar<attr path="/api/package[@name='com.evernote.android.job.util']/class[@name='JobPreconditions']/method[@name='checkNotEmpty']/parameter[@name='p0']" name="name">refparam</attr><attr path="/api/package[@name='com.evernote.android.job.util']/class[@name='JobPreconditions']/method[@name='checkNotEmpty']/parameter[@name='refparam']" name="type">Java.Lang.CharSequence</attr>Include the output dll into the main project
Done
I will test to see if it works
Great, It works in Xamarin.Android!
I have bound the library classes.jar file, needed to add Metadata to rename all the parameter names from p0, p1 to actual names. Added the proguard lines and the Android Manifest to my project with the Bound DLL, works like a charm.
If you would like to have the Xamarin Binding for this project, just give me a shout.
I don't know how this setup looks like and I wouldn't be able to maintain it. You can create your own Github repository and I could link it on the main page.
I have created a respository
Awesome, I'll update the README later.
Thank you :)
I'm reopening the issue to keep in mind that I need to do it.
I've updated the FAQ https://github.com/evernote/android-job/wiki/FAQ#can-i-use-the-library-with-xamarin-android
Thanks Dooks, I will try your bindings tomorrow as the Firebase scheduler fails to cancel jobs and that causes obvious problems.
@Dooks123 Awesome man. I don't use Xamarin though.
Most helpful comment
I have created a respository
https://github.com/Dooks123/Android-Job-XamarinBinding