What type of code is this?

Mar 28, 2013 at 8:58pm
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)
Mar 28, 2013 at 9:34pm
Looks like C#.
Mar 28, 2013 at 9:40pm
It's java
Edit:
AIDE is an Android IDE designed to write android apps on an android device.
Last edited on Mar 28, 2013 at 9:54pm
Mar 28, 2013 at 10:04pm
@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 Mar 28, 2013 at 10:05pm
Mar 28, 2013 at 10:29pm
Okay, so java is the main code that is used to code games on Android? If so, what others can be used?
Mar 28, 2013 at 10:31pm
I think you can also use C++ on Android. In fact, I think it's preferred.
Last edited on Mar 28, 2013 at 10:31pm
Mar 28, 2013 at 10:33pm
Java is the native language for 'droid programming.
Mar 28, 2013 at 10:33pm
Huh? I thought it was all in C++?
Mar 28, 2013 at 10:34pm
No, sir. Java.

You can certainly program for them in C++ but natively it's Java.
Mar 28, 2013 at 10:54pm
closed account (1yR4jE8b)
I don't think C#/.NET work on Android devices.


Wrong.

http://xamarin.com/
Mar 28, 2013 at 11:14pm
Android uses Java primarily. You're allowed to write native code too, but it's heavily discouraged if your program doesn't need it.
Mar 29, 2013 at 4:44am
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 Mar 29, 2013 at 5:05am
Mar 30, 2013 at 11:21am
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.