Description
If you try to bind a class that inherits android.app.IntentService
with class-parse
you get the following error:
Error while processing type '[Class] com.microsoft.intune.mam.client.app.MAMIntentService':
Type 'android.app.IntentService' was not found.
This is because we have used metadata
to move android.app.IntentService
to mono.android.app.IntentService
. https://github.com/xamarin/xamarin-android/blob/51f56aacd9946231672f8c173e265bfe68cb52da/src/Mono.Android/metadata#L570-L583
When class-parse
attempts to resolve the android.app.IntentService
type it cannot be found.
This works with jar2xml
because it resolves Java types using the Java jars, where the type is correct. By contrast, class-parse
resolves Java types using the [Register]
attribute in the C# assemblies which has the "moved" type name.
It is likely that we cannot "undo" this move now without breaking back-compatibility. Likely we are going to have to add a hack to generator
to know this type was moved and we need to update references to it.
Repo:
https://github.com/msintuneappsdk/ms-intune-app-sdk-android/blob/master/Microsoft.Intune.MAM.SDK.aar