Migrate iOS app to Android machine architecture -


i'm migrating ios 5.0 application android 2.3.3.

this ios app has encryption algorithm use uint32_t variables.

i've found on stdin.h:

#ifndef _uint32_t #define _uint32_t typedef unsigned int         uint32_t; #endif /* _uint32_t */ 

uint32_t unsigned int in objective-c, equivalent in java long. correct?

my question is:

does int, char, long, etc. objective-c types have same memory representation on android?

no. android (which java) not have unsigned variable types.

so if need store c unsigned 32bit integer you'll need use long in java 64 bits (so able store full precision of uint32).

any signed representation, instead, have same memory layout (but i'm not sure endianness, should check own).

this true unless choose use c/c++ in android , skip java (which can done you'll need bridge api calls java jni in case).

to solve similar issues found library, called javolution able provide implementation c structs maintaining same layout, take here. working structs, not plain variables not work you.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -