2

I plan to create an SDK (involving huge data manipulations), which can used to create applications on Android.

I plan to develop the complete SDK, including the libraries in Java, for the reason that if I implement my libraries in the native language(C++) the data movement between the Java and the native layer will involve memory copies and will make my application look slow.

I plan to port the same SDK later to other platforms like Windows Mobile. I am a bit confused on the better approach to code in such cases, keeping in mind the portability and performance of the SDK.

Inputs will be greatly appreciated.

2
  • I'm a little confused. Are you plaining to create a real SDK like the one already provided by Google or do you want to create a Framework which should then be ported to other platforms (like a Game-Engine for example)? Commented Jul 27, 2011 at 13:17
  • I want to create a framework.. Commented Jul 28, 2011 at 5:16

1 Answer 1

2

Windows Mobile supports native code (Visual C++, see Getting Started in Developing Applications for Windows Mobile) so using the Android NDK would be a good option. At least you wouldn't have to write the whole thing from scratch. You could have the common code base written in C/C++ and only write the Java wrappers for Android.

As you know, Windows Phone 7 (the successor to Windows Mobile) uses C# and whatever approach you take on Android, you'd need to rewrite the SDK from scratch anyway. Windows Phone 7.x might be supporting native code (C/C++) sometime in the future but not anytime soon.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks, that answers the portability. Could you comment on performance in terms of java and native coding in android?
From http://developer.android.com/sdk/ndk/index.html: "Using native code does not result in an automatic performance increase, but always increases application complexity." So if you're not having performance issues using only Java, you don't need native code. If portability is a major concern, native code could be ported to, for example, iOS relatively easily, just replace the Java wrappers with Objective C/C++ wrappers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.