freshplanet / ANE-Network-Info

Air Native Extension (iOS and Android) for getting Network Information
Apache License 2.0
94 stars 33 forks source link

networkInfo.findInterfaces() doesn't work... #14

Open pluralt opened 9 years ago

pluralt commented 9 years ago

Hi guys.

I'm trying to use this ane for detecting current network info on mobile devices. But when I access to AirNetworkInfo.networkInfo.findInterfaces(), it returns just null Error and hung up. Is there any rules about accessing to findInterfaces() ?

What I've done is like follows: 0: run on Android mobile device( ver.4.4.2 )

  1. init all the things: woks fine. (just simple test project)
  2. check networkInfo.isConnected() : works fine. results: true.
  3. check networkInfo.isConnectedWithWIFI() : works fine. results: true.
  4. check networkInfo.findInterfaces() : error.

TypeError: Error #1009: Cannot access a property or method of a null object reference. at com.freshplanet.nativeExtensions::AirNetworkInfo/findInterfaces()[/Users/adamschlesinger/repos/ANE-Network-Info/actionscript/src/com/freshplanet/nativeExtensions/AirNetworkInfo.as:194]

Is there any help? thanks.

FalakHumphreys commented 8 years ago

Having same issue. I've traced it down to this line failing:

public function AirNetworkInfo() {
extContext = ExtensionContext.createExtensionContext( "com.freshplanet.AirNetworkInfo", "net" ); ... }

ExtensionContext.createExtensionContext() returns "null".

I'm unfamiliar with how to fix this on the other end, so I'd also like some help with this issue.

Thanks