I have tried to convert a java list to a Scala list without success using asInstanceOf, as my returned list from an android call is a java list.
val apList = (wfm.getScanResults:java.util.List[ScanResult])
Wish to do this so that I can use the (new Scala) list in a for comprehension as it doesn't seem to like using a java list in this construct giving me an error.
value foreach is not a member of java.util.List[android.net.wifi.ScanResult]
for (ap<-apList) { .... }
^
Is their a way to use a Java list in a for/foreach, without coercing it? And if I have to coerce, how? as asInstanceOf invokes a r/t error when used in this way.