Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Android.Proximity: OnContextChange handler is invoked with different types on debug and release builds #24

Open
jramstedt opened this issue Apr 22, 2019 · 0 comments

Comments

@jramstedt
Copy link

jramstedt commented Apr 22, 2019

In debug builds I'm getting only Java.Util.AbstractSet as parameter.

In release builds it first invokes with Java.Util.AbstractSetInvoker (seems to be same as Java.Util.AbstractSet?) and after that with Android.Runtime.JavaSet. When last hotspot is removed from context I'm getting Java.Lang.Object.

My workaround:

if (p0 is IIterable) {
  enumerable = (p0 as IIterable).Iterator().GetEnumerable<IProximityZoneContext>();
} else if (p0 is IEnumerable) {
  enumerable = (p0 as IEnumerable).OfType<IProximityZoneContext>();
} else {
  enumerable = Enumerable.Empty<IProximityZoneContext>();
}
@jramstedt jramstedt changed the title OnContextChange handler is invoked with different types on debug and release builds Android: OnContextChange handler is invoked with different types on debug and release builds Apr 22, 2019
@jramstedt jramstedt changed the title Android: OnContextChange handler is invoked with different types on debug and release builds Android.Proximity: OnContextChange handler is invoked with different types on debug and release builds Apr 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant