Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Needs to be compiled for Android #29

Open
player-03 opened this issue Feb 5, 2014 · 12 comments
Open

Needs to be compiled for Android #29

player-03 opened this issue Feb 5, 2014 · 12 comments

Comments

@player-03
Copy link

Issue #27 was marked as closed without actually being resolved. I'm getting the same "Could not load module hxssl@hxssl_SSL_recv__4" error, apparently because this hasn't been compiled for Android.

Unfortunately, I'm unable to find any information on how to compile from source (much less information on how to compile from source to a .so file), so I can't fix this myself.

Tell me how, and I'll do it myself. Otherwise, could someone compile for Android?

@delahee
Copy link
Contributor

delahee commented Feb 5, 2014

The lib now uses the build.XML file with the hxcpp toolchain Theoretically
you can use haxelib run hxcpp build.xml -D Android but nobody tried before
afaik so surprise might arise.
++
Le 5 févr. 2014 04:17, "player-03" notifications@github.com a écrit :

Issue #27 #27 was marked as closed
without actually being resolved. I'm getting the same "Could not load
module hxssl@hxssl_SSL_recv__4" error, apparently because this hasn't
been compiled for Android.

Unfortunately, I'm unable to find any information on how to compile from
source (much less information on how to compile from source to a .so file),
so I can't fix this myself.

Tell me how, and I'll do it myself. Otherwise, could someone compile for
Android?


Reply to this email directly or view it on GitHubhttps://github.com//issues/29
.

@player-03
Copy link
Author

That helps, but it complains about missing header files (sha.h, bio.h, md5.h, and ripemd.h). It does this even if I specify Windows instead of Android.

I'm assuming I should run this command from the src folder, where build.xml is located. Is that wrong?

@delahee
Copy link
Contributor

delahee commented Feb 5, 2014

The .h things come from that you miss headers in your compiler directives ,
you must add them with your hxcpp config file. You ll also have trouble
with libraries because you must posess their Android .so build. The path
you are taking is arduous. Good luck.
Le 5 févr. 2014 06:44, "player-03" notifications@github.com a écrit :

That helps, but it complains about missing header files (sha.h, bio.h,
md5.h, and ripemd.h). It does this even if I specify Windows instead of
Android.

I'm assuming I should run this command from the src folder, where
build.xml is located. Is that wrong?


Reply to this email directly or view it on GitHubhttps://github.com//issues/29#issuecomment-34139413
.

@delahee
Copy link
Contributor

delahee commented Feb 5, 2014

I dont know what you want to achieve but if you have time constraints, it
might be slightly easier to delegate the https call via JNI because i am
not aware of anybody ported hxssl to droid. Gl.
Le 5 févr. 2014 08:38, "David Elahee" david.elahee@gmail.com a écrit :

The .h things come from that you miss headers in your compiler directives
, you must add them with your hxcpp config file. You ll also have trouble
with libraries because you must posess their Android .so build. The path
you are taking is arduous. Good luck.
Le 5 févr. 2014 06:44, "player-03" notifications@github.com a écrit :

That helps, but it complains about missing header files (sha.h, bio.h,
md5.h, and ripemd.h). It does this even if I specify Windows instead of
Android.

I'm assuming I should run this command from the src folder, where
build.xml is located. Is that wrong?


Reply to this email directly or view it on GitHubhttps://github.com//issues/29#issuecomment-34139413
.

@hopewise
Copy link

hopewise commented Feb 5, 2014

Whats your project type in which you need to use ssl? Is it openfl?
On Feb 5, 2014 9:43 AM, "delahee" notifications@github.com wrote:

I dont know what you want to achieve but if you have time constraints, it
might be slightly easier to delegate the https call via JNI because i am
not aware of anybody ported hxssl to droid. Gl.
Le 5 févr. 2014 08:38, "David Elahee" david.elahee@gmail.com a écrit :

The .h things come from that you miss headers in your compiler
directives
, you must add them with your hxcpp config file. You ll also have
trouble
with libraries because you must posess their Android .so build. The path
you are taking is arduous. Good luck.
Le 5 févr. 2014 06:44, "player-03" notifications@github.com a écrit :

That helps, but it complains about missing header files (sha.h, bio.h,
md5.h, and ripemd.h). It does this even if I specify Windows instead of
Android.

I'm assuming I should run this command from the src folder, where
build.xml is located. Is that wrong?

Reply to this email directly or view it on GitHub<
https://github.com/tong/hxssl/issues/29#issuecomment-34139413>
.

Reply to this email directly or view it on GitHubhttps://github.com//issues/29#issuecomment-34143949
.

@player-03
Copy link
Author

OpenFL, yes. And for the moment, I'm just using HTTP, because the data I'm sending doesn't necessarily need security.

I'll keep trying to compile this, but maybe not until after the next release...

@delahee
Copy link
Contributor

delahee commented Feb 6, 2014

I vaguely recall curl is embedded in openfl builds, maybe you should take a
look at a native curl call.

2014-02-06 player-03 notifications@github.com:

OpenFL, yes. And for the moment, I'm just using HTTP, because the data I'm
sending doesn't necessarily need security.

I'll keep trying to compile this, but maybe not until after the next
release...


Reply to this email directly or view it on GitHubhttps://github.com//issues/29#issuecomment-34307618
.

David Elahee

@hopewise
Copy link

hopewise commented Feb 6, 2014

If you are using openFL, you can do this:

request = new URLRequest();
request.url = "https://www.yourdomainname.com";
request.url += ("?param1=" + value1 + "&param2=" + value2);
request.method = URLRequestMethod.GET;
loader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.TEXT;
loader.addEventListener(Event.COMPLETE, loaderCompleteHandler);
loader.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);
loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR,
securityErrorHandler);
loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
loader.load(request);

it worked for me, but I didn't try to use POST method ..

On Thu, Feb 6, 2014 at 12:56 PM, player-03 notifications@github.com wrote:

OpenFL, yes. And for the moment, I'm just using HTTP, because the data I'm
sending doesn't necessarily need security.

I'll keep trying to compile this, but maybe not until after the next
release...

Reply to this email directly or view it on GitHubhttps://github.com//issues/29#issuecomment-34307618
.

Kind Regards,

Samir Sabri
Software Architect& Developer
www.dcaclab.com
Jordan-Middle East

@player-03
Copy link
Author

It works! Thanks, hopewise.

As for compiling hxssl (which I still want to do for the practice), I'm not sure where to find the header files in question. They aren't included in hxssl; am I supposed to compile MD5.hx and so on? Or am I supposed to use sources from an entirely separate ssl project, like OpenSSL?

@hopewise
Copy link

hopewise commented Feb 9, 2014

Glad that it worked! the library author can answer this question, but I
like to know please, did you tried GET or POST method at openFL?

On Sun, Feb 9, 2014 at 9:50 AM, player-03 notifications@github.com wrote:

It works! Thanks, hopewise.

As for compiling hxssl (which I still want to do for the practice), I'm
not sure where to find these header files so as to include them. They
aren't included in hxssl; am I supposed to compile MD5.hx and so on? Or am
I supposed to use sources from an entirely separate ssl project, like
OpenSSL?

Reply to this email directly or view it on GitHubhttps://github.com//issues/29#issuecomment-34567088
.

Kind Regards,

Samir Sabri
Software Architect& Developer
www.dcaclab.com
Jordan-Middle East

@player-03
Copy link
Author

I used POST, and I tested the Flash, Windows, and Android targets.

@hopewise
Copy link

hopewise commented Feb 9, 2014

Very cool, thanks, I just tested it with GET

On Sun, Feb 9, 2014 at 12:03 PM, player-03 notifications@github.com wrote:

I used POST, and I tested the Flash, Windows, and Android targets.

Reply to this email directly or view it on GitHubhttps://github.com//issues/29#issuecomment-34569059
.

Kind Regards,

Samir Sabri
Software Architect& Developer
www.dcaclab.com
Jordan-Middle East

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants