Live data from Hacker News

Android++: Native development and debugging extension for Visual Studio

android-plus-plus.com

21–30 of 55 posts

Re: Android++: Native development and debugging extension for Visual Studio

#21
post #4
post #2

Interesting - but to quote from the Android developer website: Typical good candidates for the NDK are self-contained, CPU-intensive operations that don't allocate much memory, such as signal processing, physics simulation, and so on. When examining whether or not you should develop in native code, think about your requirements and see if the Android framework APIs provide the functionality that you need.

Don't forget games, the vast majority of popular games are likely running native code. I don't have any stats on that, but you can check out the following games made using the open-source C++ framework Cocos2d-x that the developers asked to be featured: http://www.cocos2d-x.org/games/all?p=8&page=1

Yeah, nobody wants to have a GC pause just as they're about to do something tricky.

Re: Android++: Native development and debugging extension for Visual Studio

#22

I am curious, what are the benefits of VS over other IDEs? Obviously, there is the case where the code shop may have other project assets tied into the VS ecology-dev system but is that the only case?

IntelliSense is the best C++ code completion/"jump to definition"/"find all callers" feature available on any platform. The Visual Studio debugger is the best C++ debugger I've used. That's pretty much it, but it's enough.

Re: Android++: Native development and debugging extension for Visual Studio

#23

With the rise of x86 Androids, is it really wise to start focusing on the NDK now? http://newsroom.intel.com/community/intel_newsroom/blog/2013... I assume the Samsung Galaxy 3 Tablet is a big "x86-Android" platform, which would obviously be incompatible with ARM-Android.

As the other poster responded, NDK is not limited to ARM. NDK makes it (mostly) easy to write C++ and then compile it to multiple ISAs (x86, ARM and MIPS) and then ship all the binaries in the same APK. When the APK is installed and run on the device, the device automatically picks the appropriate binary files in the APK.

If you have some code optimized for a particular ISA, say a function which uses ARM NEON, you also have APIs in the NDK which allow you to detect which ISA you are running on and dynamically load the appropriate for that particular architecture. However, this is an optional feature. For pure C/C++ code without ASM or platform-specific intrinsics, compiling for multiple ISAs is trivial using the NDK tools.

Re: Android++: Native development and debugging extension for Visual Studio

#24

I am curious, what are the benefits of VS over other IDEs? Obviously, there is the case where the code shop may have other project assets tied into the VS ecology-dev system but is that the only case?

I tried many IDEs, I developed at lest one project in most of the common languages and I still have to find one IDE that get anywhere near VS. It is solid, with good extensions, tons of features but yet it's not scary and quite ugly like most of other IDEs. The only downside is that when you have 6 or more solutions open my computer starts to slow down.

Oh and has one of the best vim integrations.

Re: Android++: Native development and debugging extension for Visual Studio

#25
post #6
post #2

Interesting - but to quote from the Android developer website: Typical good candidates for the NDK are self-contained, CPU-intensive operations that don't allocate much memory, such as signal processing, physics simulation, and so on. When examining whether or not you should develop in native code, think about your requirements and see if the Android framework APIs provide the functionality that you need.

What is like working with the NDK? C++ is the one language that can work on both iOS and Android (and Windows phone?) Personally, I'd like to get some reuse out of my iOS code. I'd do more C++ if I knew that I could reuse it. Of course, Objective C could actually be portable too.

I find the NDK fine to work with - but I'm writing a game which is entirely C plus some embedded Lua/Moonscript.

I develop on Linux (Ubuntu), with a make file set up to build for desktop or for Android with one command, and it just works. Took a little bit of time (maybe an hour) to get the build scripts set up for Android initially, but after that it's been great.

As I'm writing a game I'm using entirely custom UI etc. so I don't worry about not being able to access the normal Android UI classes and such. I do a little bit of JNI for loading resources but that was trivial to write. My game engine works exceedingly well cross platform for desktop X86 and Android/ARM.

My email is in my profile if you have any questions.

Re: Android++: Native development and debugging extension for Visual Studio

#26
This is a very cool project. Anything that improves on ndk-gdb is tremendously exciting to me.

I hate to distract, but if this project is of interest to you, you should also check out https://developer.nvidia.com/tegra-android-development-pack It's a one-stop installer for the complete Android native development suite, a CPU profiler, a GPU debugger, Eclipse integration for native debugging and the best Visual Studio integration I've found yet (I have not yet tried Android++).

To my knowledge, Nvidia is doing more to improve the native development experience on Android than any other group on the planet (including Google). This is my plea to ask as many people as possible to try their package and give them feedback just so that they'll be motivated to put even more resources into the project.

It is quite awesome of Natural Motion to release Android++ to the public. Given their "No Hardware Restrictions" feature I understand their concern with relying on Nvidia. However, from working with Nvidia, I'm quite confident that Nv's primary concern is getting people to make high-performance games on Android at all. I would encourage Natural Motion and Nvidia to reach out and find ways to help each other reach their common goal -beyond simply providing friendly competition.

Re: Android++: Native development and debugging extension for Visual Studio

#27
This is certainly good for games and similar multimedia heavy type apps.

However, if you're using C++ for portability for any sort of non-realtime needs you've lost your marbles, and would be better off with JavaScript (no, really) and/or platform specific code to leverage the class libraries of the respective platforms. C++ heavy apps on Android are larger, use more memory, and load less quickly. This isn't obvious if you're used to other worlds, but it is a side effect of how pervasive Dalvik is on the system. Even if most of your app code is in C++ it's still easy to get screwed by a GC pause caused by where you have to interface with the framework.

Much of the underlying problem here is that speed-wise Dalvik just isn't very good. It wasn't even competitive with J2ME VM performance when it first appeared, and took a long time to get close.

With all that said, native debugging has been a sore point forever, and any improvement in that area is welcome.

Re: Android++: Native development and debugging extension for Visual Studio

#28

This is certainly good for games and similar multimedia heavy type apps. However, if you're using C++ for portability for any sort of non-realtime needs you've lost your marbles, and would be better off with JavaScript (no, really) and/or platform specific code to leverage the class libraries of the respective platforms. C++ heavy apps on Android are larger, use more memory, and load less quickly. This isn't obvious…

It's my understanding that this counter-intuitive performance problem with Dalvik is what crippled the original UI for Android Firefox - they were using their native C++ UI stack (the one used on Windows, Mac and Linux) to implement the whole browser UI, but they found that in practice a UI stack written in Java running on Dalvik performed better because it wasn't subject to all the weird performance penalties from interacting with android frameworks.

Re: Android++: Native development and debugging extension for Visual Studio

#29

This is certainly good for games and similar multimedia heavy type apps. However, if you're using C++ for portability for any sort of non-realtime needs you've lost your marbles, and would be better off with JavaScript (no, really) and/or platform specific code to leverage the class libraries of the respective platforms. C++ heavy apps on Android are larger, use more memory, and load less quickly. This isn't obvious…

If by JavaScript you mean making a webview-based app with something like Cordova/PhoneGap, then that's not a great option either. Pre-4.4 WebView on android is notoriously bad, and things as trivial as smooth scrolling are a huge issue. The same app performs fine on iOS and on Android 4.4 which uses Chrome's engine, but unfortunately it will be a while before older versions go the way of IE6. I agree that C++ is not a solution for portable GUI apps either (although it works great for portable games since OpenGL ES runs on pretty much everything.)

Re: Android++: Native development and debugging extension for Visual Studio

#30

I am curious, what are the benefits of VS over other IDEs? Obviously, there is the case where the code shop may have other project assets tied into the VS ecology-dev system but is that the only case?

At least one clear advantage is that Eclipse is horribly slow in debugging when compared to VS. I don't know how does IntelliJ compare to it because I haven't used that.
Post reply on HN