View Full Version : Android C/C++ dev kit
constellanation
06-26-2009, 06:20 PM
Android goes beyond Java, gains native C/C++ dev kit (http://arstechnica.com/open-source/news/2009/06/android-goes-beyond-java-gains-native-cc-dev-kit.ars)
Google has launched a new native development toolkit for Android that will make it possible for third-party Android application developers to use C and C++. Google has also released an Android scripting environment that supports Python and Lua.
sounds interesting/promising... perhaps someone else could explain it's importance?
cannontrodder
06-26-2009, 06:49 PM
Ok, all applications on Android run inside a virtual machine called Dalvik. From here they can access all the various components of the phone allowing your application to interact with the libraries of code on the device - ie operate the phone, read the GPS and so on.
You write the code in Java and it is compiled to byte-code that then gets converted in real-time to actual 'native' code that runs on whatever CPU is in the phone. In the case of the G1, this is a ARM chip. The benefit of this approach is that if you took the same package and ran it on Android for another CPU, it would be converted on the fly to run on *that* processor. So what this means is that developers can write their apps and have them run on any android device regardless of the CPU they have.
The main drawback with this is that the conversion between the byte-code and the native code for that CPU is a performance overhead - it is slower than code written and compiled for the CPU directly. This native development kit makes it easier for developers to write code that can be compiled directly to native code.
The benefit for code written in this way is that it is very fast. The two main drawbacks are that firstly, the native code cannot call any of the other functions of the phone - it is isolated to prevent bad code crashing the phone and secondly, the developer will need to compile a version of the native code for each CPU they wish to support. With the number of devices coming out, the number of CPUs they need to support is only going to rise.
The idea is that developers continue to write their applications using the dalvik VM but take small parts of their code that really need a lot of speed and implement them in native code.
As for the scripting engines, it will be a really simple (albeit slow) way to hack together simple apps or macros directly on the phone itself without any need for a pc or development environment.
Iceberg
06-26-2009, 06:49 PM
Pretty much applications like Sexy beach girls top 50 for 5 bucks and botb00bs won't exist anymore I hope. haha.
constellanation
06-26-2009, 07:26 PM
Thanks cannontrodder, that actually makes a lot of sense! very well written. thank you again!
ickyfehmleh
06-26-2009, 07:58 PM
Pretty much applications like Sexy beach girls top 50 for 5 bucks and botb00bs won't exist anymore I hope. haha.
No, they'll still exist, plus they'll be faster because the boobie bounce processing will all be done in native code.
The Python interpreter is interesting, especially if Dalvik-based applications are allowed access to it. There are quite a few applications available for eg Linux that can be extended via Python, mostly because it's easier than writing C/C++/Java code that plugs in but also because Python is awesome. If Dalvik-based applications can be extended via Python, this opens up a whole slew of opportunities for developers. It also makes mocking out an application incredibly easy -- quickly write the "first draft" in Python to make sure you have the logic and interoperability right, then rewrite in Java for a finalized product.
Bratag
06-29-2009, 09:38 AM
No, they'll still exist, plus they'll be faster because the boobie bounce processing will all be done in native code.
The Python interpreter is interesting, especially if Dalvik-based applications are allowed access to it. There are quite a few applications available for eg Linux that can be extended via Python, mostly because it's easier than writing C/C++/Java code that plugs in but also because Python is awesome. If Dalvik-based applications can be extended via Python, this opens up a whole slew of opportunities for developers. It also makes mocking out an application incredibly easy -- quickly write the "first draft" in Python to make sure you have the logic and interoperability right, then rewrite in Java for a finalized product.
I am really looking forwards to being able to do graphic manips in C. For raw pixel by pixel stuff you cant beat good ole memory efficient C.
ickyfehmleh
06-29-2009, 12:14 PM
I am really looking forwards to being able to do graphic manips in C. For raw pixel by pixel stuff you cant beat good ole memory efficient C.
I'm really looking forward to having more applications do bouncing boobies.
Powered by vBulletin® Version 4.1.7 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.