I\'m working with my new app which processed captured image from cellphone camera. My phone is Nexus S, 2.3.4.
I create a ARGB_8888 Bitmap with captured data. I know
ARM processors (on which some Android is running) supports both endian formats.
In NDK-ROOT/platforms/android-[x]/arch-arm/usr/include/machine/endian.h you can find:
#ifdef __ARMEB__
#define _BYTE_ORDER _BIG_ENDIAN
#else
#define _BYTE_ORDER _LITTLE_ENDIAN
#endif
__ARMEB__ is defined by the gcc compiler when using the -mbig-endian ARM option.
Even if most Android architectures are using little endian by default you shouldn't take this for granted and for portability reasons your native code should be able to handle both endiannes.
To do that you should #include and check BYTE_ORDER to architecture your code properly.