What does it mean to say that Java is native for Android and Objective-C is native for iOS? - native

By saying native code, we understand the code which is being executed by directly calling CPU or OS functions. Why do people say that Android went with Java, or Java is native for Android development when Java is being executed on VM? The same things you can for Objective-C and iOS. What is the reason people say that?

None of them are "native" to the OS. Both are languages, both get compiled.
objective C will get compiled to assembly, that can be directly run by a processor
java will get compiled to byte code that will be interpreted by a JVM (namely dalvik)
since Android 4.4, a new virtual machine appeared for Android : ART, it will get all bytecode compiled in assembly, but this is still experimental for now.
With Objective C you could argue that the language used to create apps is the same as the language to code the OS. For Android is would be more difficult to say so. The OS is build mostly in C, some parts in Java, but Android API themselves are also made of a mix of C and Java.

Android Native Library, allows you to implement parts of your app using native-code languages such as C and C++, allows you write native code. JAVA - is not native. On the byte-code level, Android doesn't use Java. The source is Java, but it doesn't use a JVM.
WHY JAVA? Android runs on many different hardware platforms. You would need to compile and optimize your native code for each of these different platforms!
Why does Android use Java?

Related

Can I compile libpqxx to run on iOS and Android?

I developing a game in Unreal and want to use Postgres as a backend. the only information I can find as to what platforms libpqxx can be compiled for is that "...access databases managed by postgres—on just about any platform—then libpqxx is the library you use". Does anybody know if it will compile to iOS and Android? If not, can somebody recommend another database I can interface with in C++ that i can use with mobile devices?

Lua and native code in Kony Studio

I am trying to understand the "write once deploy anywhere" feature of Kony Studio. What about native code? I know that Kony added JavaScript support in V5 but as I understand it that is just for the Web-based app portion. Am I correct to assume that native code is still written with Lua and then generated for each platform? Do they convert Lua to Java, Objective-C and C# for the 3 main platforms? When debugging are you looking at Lua or the native language? - Thanks.
Kony embeds the google v8 js engine along with the native app. This will interprets the js code to native at runtime.
JavaScript is still used for scripting against the Kony API. LUA is not necessary for native apps. Remember that the API is an abstraction layer to the underlying native SDK - Kony is not a code gen tool.
Added to we can choose the developing language from javascript or Lua. If we choose Lua then instead of V8 engine it will be Lua Virtual machine that which is doing the interpretation.

Is it possible to build Adobe AIR native extension with .NET C#?

As the question implies, is there any tutorial or article about using .NET C# to build a native extension for Adobe AIR ?
Is it a must to use C ?
You're limited to using C for iOS ANEs or Java for Android ANEs as the Flash Runtime Environment provides an SDK only for those languages. You can, in practice, write your native extension in any language that can properly interface with the SDK language (e.g. Objective-C or C++ on the iPhone, for example).

Airplay SDK vs Monotouch?

I think the title is pretty self explanatory. The only thing is I come from the background of XCode and Obj-C and I have this project that I have to develop for IOS, Android and BB. So what are my options? which one would you recommend? I am leaning more towards Mono, is that a good call?
A
Do you have any experience with C#?
Since you have an Objective-C background, it might be easier for you to use Obj-C, and Java for Android/BlackBerry. Otherwise it will be C# for iOS/Android and Java for BlackBerry (you could potentially have to learn 2 languages there).
I have very a strong preference for MonoTouch and find it much more productive than Objective-C, but I came from a C# .Net/Windows background.
I would stay away from "cross-platform" tools such as Airplay SDK, you app will probably be slower and not feel very native in the end. MonoTouch and Mono for Android are more truly native.
As you want to target three platform, I think your only option is Marmalade. Otherwise you have to write your project for those three platforms, separately. Using Marmalade you can distribute your project for all those mentioned platform easily just using their Deployment Tool. And for iOS development you don't need to own a Mac or xCode, although for publishing your project into Apple Store you still need to join Apple Developer program.
I personally not recommend MonoTouch as you still need a Mac computer (if you already don't have one). Plus, you still face the problem with porting your project into BB because AFIK MonoTouch don't support it. Also with MonoTouch you have to learn Cocoa, Cocoa Touch framework and Android framework, as MonoTouch is only an abstract class over these SDKs in C#. But if you go with Marmalade you only need to learn Marmalade SDK, which IMP is simpler than Android and Cocoa*.

Objective c websockets for desktop application

All of the Objective c websocket libraries that I've found seem to be specific for iOS and give linking problems when I try to use them in my desktop app.
I've tried:
http://code.google.com/p/unitt/wiki/UnittWebSocketClient
https://github.com/esad/zimt
Are there Objective c libraries that work for desktop apps? Alternatively how difficult would it be to modify zimt to work on the desktop?
EDIT: I ended up using: https://github.com/erichocean/cocoa-websocket
I just tried zimt and it was trivial to integrate into a test OS X project. I followed the installation instructions, then set the project to be Mac rather than iOS and Intel rather than ARM.
If you are having difficulty getting it working, then submit that as a question, including any error messages you get and any incorrect behaviour you see.