Bear with me here.....
I am working on an android project that uses the NDK thru the JNI interface.
It started as a c++ browser plugin and was then ported to iPhone as an app.
Mostly all libraries like libavcodec, curl, etc were built for ARM and my c++ was wrapped by objective C.
Having never done Objective C, it was a bit painful at first. Xcode is different than Visual Studio but on par with it.
The debugging and profiling tools in xcode for iOS are unparalleled in mobile development, better than Visual Studio on the desktop!
Now, In an attempt to reuse as much code as possible, I do the UI in java and use the JNI to connect to my C++ code.
PS. I get really annoyed with the attitude out there that recommends I re-write everything in java.
When dealing with large amounts of memory allocations and bandwidth, aka Streaming Video, Java sucks.
When You have a year plus in a code base, you don't arbitrarily re-write it.
After using linux, windows and mac desktop and mobile development environments, I was really disappointing with the eclipse Android development.
It is hard to imagine they can stay in the market if they continue to be so substandard on tools.
The problems are the eclipse environment is from one group then 2 plugins are from another group, the sdk a third.
Compounding the issue is the @#$@ cell phone providers that won't update phones so 47% of the market is still on Gingerbread.
So what Have I learned.
Depending on what your app does, Start with C++ and wrap it in objective-C working in Xcode if you can with an iphone
Then port to java wrapped android.
Either way, A good seperation of the UI toolkit language and the core code works well to re-use code.
Android debugging will take you 5 times as long as iOS. I am using log statements for most of the c++, eclipse ndk debugging crashes more times than runs and ignores breakpoints.
Really learn the Android life cycle. Things like rotating a device by default restart the application basically. (whos bright idea was that one?)
I wish I could comment on cocos2d-x It looks very very promising, I have just haven't had the time to try it.
http://www.cocos2d-x.org/ My design is such that
HTML + javascript is the UI in a browser and calls my video player
Objective-C and cocoa is the UI in iPhone
Java is the UI in android
Th c++ core is 90% the same on all 3!
On Mon, Jan 14, 2013 at 11:11 AM, Eric Wing
<[hidden email]> wrote:
I agree with the others about the NDK not being for the faint of heart
and you should pick a more native and mature environment to start
learning in. I agree with foo64's sentiments that an IDE like Visual
Studio might be a better place to start, but I'm going to slam Visual
Studio and their pathetic C compiler which is now 2 standards behind
the C spec (i.e. over 20 years out of date) with Microsoft clearly
demonstrating they don't care.
A more Unix-y system like Linux, BSD, or Mac are better places to
learn and develop with C. Mac will also give you a good IDE (Xcode)
which has very good support for C (because it has to because
Objective-C is a pure superset of C). Xcode's C compiler (clang)
already seems to be a further along on C11 features too. And since you
said you eventually want to learn Obj-C, starting on a Mac also makes
a lot of sense.
-Eric
--
Beginning iPhone Games Development
http://playcontrol.net/iphonegamebook/
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to
[hidden email].
To unsubscribe from this group, send email to
[hidden email].
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.