I tried converting a java list to a Scala list without success using asInstanceOf since my returned list from an android call is a java list.
val apList = (wfm.getScanResults:java.util.List[ScanResult])
Desire to do this so that I can use the (new Scala) list in understanding, since it doesn't seem to him that using a java list in this construct gives me an error.
value foreach is not a member of java.util.List[android.net.wifi.ScanResult] for (ap<-apList) { .... } ^
Is their way to use the Java list in for / foreach without forcing it? And if I need to force, how? since asInstanceOf causes an r / t error when used this way.
java scala scala-java-interop
nfc-uk
source share