hap-java / HAP-Java

Java implementation of the HomeKit Accessory Protocol
MIT License
153 stars 82 forks source link

Does this compile and run on Android? #25

Closed torinnguyen closed 7 years ago

torinnguyen commented 7 years ago

I'm very familiar with writing Android app, but not much with Java app. So I'd like to ask if this code can be compiled and run in an Android project?

andylintner commented 7 years ago

Android compatibility was not a goal. I believe the use of lambdas and other jdk8 features preclude its use on Android, but I'm no expert on that matter.

likaci commented 7 years ago

@torinnguyen @beowulfe
Android 7 support java8. I have tried to use this lib with Android, compile passed, but iOS device can not find the bridge. Maybe due to network permission or other..

@torinnguyen Do you have any other method make HAP compatible with Android?

Thanks.

06-22 16:46:58.548 31853-31872/? I/System.out: The PIN for pairing is 031-45-151
06-22 16:46:58.564 31853-31872/? W/System.err: [Thread-2] INFO com.beowulfe.hap.HomekitRoot - Added accessory Test Bridge
06-22 16:46:58.564 31853-31872/? W/System.err: [Thread-2] INFO com.beowulfe.hap.HomekitRoot - Added accessory Test Lightbulb
06-22 16:46:58.622 31853-31872/? I/MainActivity: run: 
06-22 16:46:58.623 31853-31882/? W/System.err: [nioEventLoopGroup-2-1] INFO io.netty.handler.logging.LoggingHandler - [id: 0xcadc7fa8] REGISTERED
06-22 16:46:58.623 31853-31882/? W/System.err: [nioEventLoopGroup-2-1] INFO io.netty.handler.logging.LoggingHandler - [id: 0xcadc7fa8] BIND(::/:::9123)
06-22 16:46:58.624 31853-31882/? W/System.err: [nioEventLoopGroup-2-1] INFO com.beowulfe.hap.impl.http.impl.NettyHomekitHttpService - Bound homekit listener to /:::9123
06-22 16:46:58.624 31853-31882/? W/System.err: [nioEventLoopGroup-2-1] INFO com.beowulfe.hap.impl.jmdns.JmdnsHomekitAdvertiser - Advertising accessory Test Bridge
06-22 16:46:58.624 31853-31882/? W/System.err: [nioEventLoopGroup-2-1] INFO com.beowulfe.hap.impl.jmdns.JmdnsHomekitAdvertiser - Registering _hap._tcp.local. on port 9123