How to use OfxLibwebsockets for android?
Hey guys how can OfxLibwebsockets be used on android with in openFrameworks built through NDK?
Hello! It's definitely possible, but you'll have to compile libwebsockets for Android and include that.
It'd be amazing if you could submit a pull request if you're able to get that up and running!
I have been trying to compile libwebsockets from source and facing many issues with its depandencies like OpenSSL, Zlib etc, Have you tried compiling for andorid?
Hi While bulding libwebsockets.a I disabled Openssl support to build the static Lib, How can I disable the Openssl in OFXLibwebsockets wrapper? To Integrate this with my project.
If you swap out the libwebsockets.h that's included it should work near out of the box. I believe their API is the same either way, and it should just ignore the other stuff passed to it.
Let me know how that goes!
On Aug 21, 2014, at 9:14 AM, sandeep [email protected] wrote:
Hi While libwebsockets.a I disabled Openssl support to build the static Lib, How can I disable the Openssl in OFXLibwebsockets wrapper? To Integrate this with my project.
— Reply to this email directly or view it on GitHub.
I build a static library(libwebsockets.a) of libwebsockets using android NDK r9c and current master branch of libwebsockets , then linked the with ofxLibwebsockets. while keeping the libwebsockets.h from ofxLibwebsockets it-self. Everything compiled verywell and I am able to launch the app on an Android device.But when I run simple client connection script it fails with the message "[ofxLibwebsockets] client connection failed"
I am sure that this is not a problem with internet connection etc, Does anything cross your mind about possible reasons for this? I tried setting network permissions on AndroidManifest.xml as well which was not fruitful.
As I mentioned earlier I build libwebsockets after disabling openssl support, Is this creating any trouble? Or does it have to do with using libwebsockets.h from ofxLibwebsockets?
Hm, minus SSL shouldn't be the problem. The permissions thing was my first guess; I know in processing we just enable the "internet" permissions.
Double check 1) the network on your android device and 2) where it's trying to connect to. echo.websocket.org is a great test, as is running a ofxLibwebsockets server on your machine.
On Aug 23, 2014, at 12:46 AM, sandeep [email protected] wrote:
I build a static library(libwebsockets.a) of libwebsockets using android NDK r9c and current master branch of libwebsockets , then linked the with ofxLibwebsockets. while keeping the libwebsockets.h from ofxLibwebsockets it-self. Everything compiled verywell and I am able to launch the app on an Android device.But when I run simple client connection script it fails with the message "[ofxLibwebsockets] client connection failed"
I am sure that this is not a problem with internet connection etc, Does anything cross your mind about possible reasons for this? I tried setting network permissions on AndroidManifest.xml as well which was not fruitful.
As I mentioned earlier I build libwebsockets after disabling openssl support, Is this creating any trouble?
— Reply to this email directly or view it on GitHub.
Hi,
I figured that you are using version 2.3 release of libwebsockets, and felt that version variance is creating the problem. So I built it with 2.3 and repeated the steps and it worked :)
Hello! Can you try using the 0.8.4 branch and see if it works with the latest version of libwebsockets for Android? If so, can you submit a PR with the android lib? Thanks!
Any news on this? I know it's an old topic, but I wish to use Spacebrew on android with ofx and this is a dependency to it.
Hey @aristizabal95, I’m sorry to say I’ve had to put writing code on the back burner for a bit. Sounds like you might be able to check out that other branch? Happy to merge in a PR if you get anywhere with it.