Android Community
Results 1 to 7 of 7

Thread: Android C/C++ dev kit

  1. #1
    constellanation's Avatar
    constellanation is offline *sigh*... I think I'll go spend some time with the family
    Join Date
    Oct 2008
    Posts
    6,849

    Default Android C/C++ dev kit


    Android goes beyond Java, gains native C/C++ dev kit


    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?

  2. #2

    Default Re: Android C/C++ dev kit

    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.
    Grabbing and playing BBC iPlayer programmes on your G1

    Currently running The Dude's v1.0 Release
    Waiting on new class 6 card for apps2sd

  3. #3
    Join Date
    Mar 2009
    Location
    California
    Posts
    1,967

    Default Re: Android C/C++ dev kit

    Pretty much applications like Sexy beach girls top 50 for 5 bucks and botb00bs won't exist anymore I hope. haha.

  4. #4
    constellanation's Avatar
    constellanation is offline *sigh*... I think I'll go spend some time with the family
    Join Date
    Oct 2008
    Posts
    6,849

    Default Re: Android C/C++ dev kit

    Thanks cannontrodder, that actually makes a lot of sense! very well written. thank you again!

  5. #5
    Join Date
    Sep 2008
    Location
    The Boonies of Pinal County, Arizona
    Posts
    1,186

    Default Re: Android C/C++ dev kit

    Quote Originally Posted by Iceberg View Post
    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.
    I blame this man for most programming problems.

  6. #6
    Join Date
    Oct 2008
    Posts
    318

    Default Re: Android C/C++ dev kit

    Quote Originally Posted by ickyfehmleh View Post
    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.
    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

  7. #7
    Join Date
    Sep 2008
    Location
    The Boonies of Pinal County, Arizona
    Posts
    1,186

    Default Re: Android C/C++ dev kit


    Quote Originally Posted by Bratag View Post
    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.
    I blame this man for most programming problems.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •