Skip to content
This repository was 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

@jramstedt

Description

@jramstedt

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>();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions