What type of code is this?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package com.kalebfritch.txtadvn1;

import android.app.*;
import android.os.*;
import android.view.*;
import android.widget.*;

public class MainActivity extends Activity
{
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState)
	{
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }
}

I have an app on my kindle fire called AIDE, and I would love to know what this language is called, as I plan to start off my development career developing for android (unless you guys recommend otherwise)
Looks like C#.
It's java
Edit:
AIDE is an Android IDE designed to write android apps on an android device.
Last edited on
@helios: lol, there's multiple reasons this isn't C# - for one, I don't think C#/.NET work on Android devices.
Last edited on
Okay, so java is the main code that is used to code games on Android? If so, what others can be used?
I think you can also use C++ on Android. In fact, I think it's preferred.
Last edited on
Java is the native language for 'droid programming.
Huh? I thought it was all in C++?
No, sir. Java.

You can certainly program for them in C++ but natively it's Java.
closed account (1yR4jE8b)
I don't think C#/.NET work on Android devices.


Wrong.

http://xamarin.com/
Android uses Java primarily. You're allowed to write native code too, but it's heavily discouraged if your program doesn't need it.
I see a lot of ignorance on this thread....

C# can be use for android. I already do so for my HTC phone using Mono. Mono includes everything you need to code an app with C# and run it on android or iOS.

True, Java is primary for apps on Android, but only for apps. LB is right, if you talk about the android OS. Google used C++ to create both android and their other OS for their new notebook. (cant ever remember what it is called)

C++ can be used directly on an android device. See an app called: "C4Droid" it is not a free compiler however, but very cheap. You can get a SDL library plugin on it too directly from the app store.

The code the OP quoted is Java, but Java and C# look very alike and function very similarly for many things. If you have never coded with either, you can easily mistake the too.

Edit:
for more information please see:
http://monogame.codeplex.com/
http://www.mono-project.com/Main_Page
QT is another cross platform thing you can use with C4Droid:
http://qt.digia.com/

I plan to start off my development career developing for android (unless you guys recommend otherwise)

I don't recommend otherwise currently. There is a large market of jobs for that, however, by the time you are older and done school; this may change...

Edit 2:
Actually, I personally suggest C# over Java. not only because it is my language of choice (other then C++), but because both C++ and C# can easily use .Net while Java cannot (well it can, but not easily :p ). True, which language is better, is a matter of opinion, however I found it easy to use C++ to work on projects i had already started with C#. Also C# works well with JavaScript and Ruby on rails.
Last edited on
Wow, shows how ignorant I was. Are there any free, Android C++ compilers around, the Java is getting slightly annoying.
Topic archived. No new replies allowed.