#ifdef ANDROID

#include "WiFiSensorAndroid.h"

extern "C" {

	/** called after each successful WiFi scan */
	JNIEXPORT void JNICALL Java_indoor_java_WiFi_onScanComplete(JNIEnv* env, jobject jobj, jbyteArray arrayID) {
		(void) env; (void) jobj;
		jsize length = env->GetArrayLength(arrayID);
		jbyte* data = env->GetByteArrayElements(arrayID, 0);
		std::string str((char*)data, length);
		env->ReleaseByteArrayElements(arrayID, data, JNI_ABORT);
		WiFiSensorAndroid::get().handle(str);
	}

}

#endif
