Android Development

  • (2 Pages)
  • +
  • 1
  • 2

21 Replies - 4057 Views - Last Post: 19 July 2012 - 08:41 AM

Poll: Android Development (10 member(s) have cast votes)

What should I do

  1. Deal with Java and Eclipse (9 votes [90.00%])

    Percentage of vote: 90.00%

  2. Use the NDK and learn C++ (0 votes [0.00%])

    Percentage of vote: 0.00%

  3. Use Mono and continue with C# XNA (0 votes [0.00%])

    Percentage of vote: 0.00%

  4. Go die in a hole :( (1 votes [10.00%])

    Percentage of vote: 10.00%

Vote Guests cannot vote

#1 DanielLeone  Icon User is offline

  • D.I.C Head

Reputation: 22
  • View blog
  • Posts: 177
  • Joined: 04-February 12

Android Development

Posted 12 July 2012 - 03:00 AM

Hello there,

I want to develop for Android, but I'm having issues getting there.

I'm very comfortable with C# and XNA in Visual Studio 2010 Ultimate.

I like it, and it's the only language I've ever learned, so I can't say I prefer it over anything really.

The reason I decided to use C# and XNA was because it seemed the best choice for starting Game Development, but it's not supported by Android. This is where my problems begin. :(

There is a project called Mono. Costs $400 but hey, it ports C#, .Net and XNA over to Android, pretty much stress free. It seems like a very feasible option. However, when Microsoft moves over to Windows 8 and the whole Metro style, they won't be supporting XNA, well hardly as much anyway, and allowing C++ with DirectX and OpenGL and stuff like that. (I don't really know much on that topic).

So I don't really want to spend $400, if I might not even get the money back through profits before XNA is no longer supported.

So, moving on, I really like VS. I downloaded Eclipse and have used that, and I actually really hate it. I don't want to start that war over the best IDE, I just don't like it. Moving on.

I can learn C++ in Visual Studio, and Google have a tool called the NDK (Native Development Kit), that lets you write Native code for Android.

While awesome, it's not going to be any where near as simple as a Mono conversion, and there a bunch of things you can't do. Yet, I'm sure they'll keep Updating it and improving it, but the question still stands.

I know that C# and Java are very similar, so I'm sure that developing in Java would be alright, and the good thing about Java is it has all the Android API's ready. It's going to be A LOT more straight forward than used another tool or something.

Although, I know I said I want to develop for android, but that's mainly because it's only $25, and there is a massive market for it. Also it's easy to put thing on Google Play, in comparison to like Apple who check it and stuff.

Then, the good thing about developing in C++ is that it can go on Windows 8, Apple, and if the NDK works, Android.

All I'm asking if for your opinions here, and how others develop for Android.

At the moment C++ is looking like a good option, because it's in VS and 'can' go on Android.
Then again (;)), I though C++ is a major step up from C# XNA, and an underlying problem is the NDK doesn't support references or dll files. So all libraries must be in the project, if you know what I mean.

Thanks in advance,
Daniel,

Is This A Good Question/Topic? 0
  • +

Replies To: Android Development

#2 Dogstopper  Icon User is offline

  • The Ninjaducky
  • member icon



Reputation: 2871
  • View blog
  • Posts: 11,026
  • Joined: 15-July 08

Re: Android Development

Posted 12 July 2012 - 04:39 AM

I would advise strongly against using the NDK as it manages nothing for you, and it is not executed in managed space. You can seriously mess up a phone if you do not perfectly allocate too much memory and release it. On top of that, you would have to manually handle what to do when your app loses 'focus' (like the user receives a phone call). You have to detect that and handle basically by hand the entire Android lifecycle.

The Java used in Android is quite unlike the Java you may be familiar with in that it uses a much different set of libraries for graphics and it runs on the Dallvik Virtual Machine, which is highly optimized for google phones. So your speed loss compared to C++ will be nill to none, and your app will be able to EASILY respond to things like focus loss and other such things. I would really not worry about speed in terms of Java vs. C++ on the Android. In fact, because of the way that the NDK needs to handle so much, you are more likely to write bad code for the NDK and have it run slower than the Java version.

I don't know what your problem with Eclipse is. Personally, with enough plugins, it does the exact same thing as Microsoft VS does AND it has Android support. However, Netbeans also has Android bindings if you want to try it instead. However, if you want to talk about Eclipse customization, we can do that too.

As for the C#...just don't. For gaming, you'll want something sleek, fast, and designed for the Android. It's silly to go to THAT much work over an IDE. Just grow up and useeither an IDE or a notepad and command line (that works too you know).

So my advice - DEFINITELY Java. It has fantastic bindings to OpenGL on Android, and you will have managed applications which is a HUGE plus and saves potentially weeks of development.

I'm also going to move this to Android for better discussion.
Was This Post Helpful? 1
  • +
  • -

#3 DanielLeone  Icon User is offline

  • D.I.C Head

Reputation: 22
  • View blog
  • Posts: 177
  • Joined: 04-February 12

Re: Android Development

Posted 12 July 2012 - 06:03 AM

Thanks for the reply Dogstopper,

Since posting I've done a lot more reading, and I have to agree with what your saying.

Thinking about it, there's the right tool for the right job, and in my case, it's really going to be Java. I suppose it was just the fact of dealing with it, and realising it.

View PostDogstopper, on 12 July 2012 - 07:39 PM, said:

I don't know what your problem with Eclipse is. Personally, with enough plugins, it does the exact same thing as Microsoft VS does AND it has Android support. However, Netbeans also has Android bindings if you want to try it instead. However, if you want to talk about Eclipse customization, we can do that too.


I would love to talk about Eclipse customization, but it's not really the performance, or capabilities of it, just the visuals mainly. I know it sound overly 'nit-picky', but don't you find it far to bright? Are there like some skin options for it or something. And it's the little things like moving around the Dockable windows, in VS you can pick them up and snap them anywhere.

I can go on for hours (maybe), but by next week I probably look but and realise how naive I sound, so yeah, any suggestions for customising Eclipse?

I'm going to have a read of this and this, and hopefully that'll clear things up a bit.

And one more question about Eclipse, what's with workspaces?
I'm sure they're practical and have they're reason, but as I said I'm going to read those articles, but does anyone have advice on them.

Coming from VS which used the Solution(which were awesome ;)), are they somewhat similar?


View PostDogstopper, on 12 July 2012 - 07:39 PM, said:

As for the C#...just don't. For gaming, you'll want something sleek, fast, and designed for the Android. It's silly to go to THAT much work over an IDE. Just grow up and use either an IDE or a notepad and command line (that works too you know).


And with that comment, I'm assuming (hoping) your talking about Android Game Development, and not Game Development in general? Because in that case I'd agree with you, your really going to want something designed for Android, because there are always going to be those little thing that will feel a little out of place.

Thanks once again,
Daniel,

This post has been edited by DanielLeone: 12 July 2012 - 06:07 AM

Was This Post Helpful? 0
  • +
  • -

#4 jon.kiparsky  Icon User is offline

  • Pancakes!
  • member icon


Reputation: 7648
  • View blog
  • Posts: 12,902
  • Joined: 19-March 11

Re: Android Development

Posted 12 July 2012 - 06:27 AM

View PostDanielLeone, on 12 July 2012 - 08:03 AM, said:

I would love to talk about Eclipse customization, but it's not really the performance, or capabilities of it, just the visuals mainly. I know it sound overly 'nit-picky', but don't you find it far to bright? Are there like some skin options for it or something. And it's the little things like moving around the Dockable windows, in VS you can pick them up and snap them anywhere.


I really don't like Eclipse, personally, but these don't seem like great reasons to reject a tool.

As for your overall question, I think you'd be best off learning java and working in Eclipse. Honestly, you won't have any trouble dealing with Java as a whole, and the android-specific parts are in some ways improvements over dealing with desktop java - if only because you don't have to deal with Swing, and any day you don't have to deal with Swing should be counted as a good day.
Why work in Eclipse? Because it's a well-tested toolset for the purpose, and since it's the default, you'll be in sync with other developers when you run into trouble. That'll make it easier to get help, and won't that be nice?
Was This Post Helpful? 0
  • +
  • -

#5 Ryano121  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1362
  • Posts: 3,002
  • Joined: 30-January 11

Re: Android Development

Posted 12 July 2012 - 06:44 AM

It's really no surprise that you hate Eclipse. You have been working solely with Visual Studio for your programming, it's therefore practically natural that you dislike anything that is not like VS. People don't like change.

As has been said before those reasons are pretty petty reasons to not use the IDE (which by the sounds of things you haven't really used properly yet). Personally I use Eclipse solely (well for Java dev anyway) and I get along very well with it (with the right number of plugins). Similarly to you I for some reason just hate Netbeans. I don't really know why, I haven't used it properly for an actual project yet, but for some reason I still hate it. I guess it's because I have been working with Eclipse like you with VS. We don't like others for that reason.

Quote

And one more question about Eclipse, what's with workspaces?


Workspaces and solutions are very similar but not exactly the same. With solutions you have a big 'base' project (the solution) and you have a bunch of sub projects under this base project. However for most people all these solutions, which themselves may each house tens of projects, live in the default Visual Studio projects folder (or some other place if you change it). This all seems great until you start having a whole load of solutions all over the place. Personally I have 50+ solutions folders in my base project directory for VS (a bunch of which are still under development, and others are dead), and well its a complete mess and needs sorting out when I can be bothered to.

The idea of workspaces is much the same. You set a workspace as your 'base' project, and have a bunch of other projects in your workspace. When you want to change 'base' projects, you just change your workspace and bobs your uncle your other set of projects is open. In this case yeah they are the same as solutions. In my opinion however where they differ is with actual paths on your HDD. As I said I have a bunch of solutions rolling around in one single folder, all mixed together horribly. It's easy to do in VS. You just create a new solution and press ok, ok and it ends of in the same folder all the time. With workspaces however I think you are encouraged to have a more structured directory system for your projects. Instead of having your work solutions with your personal solutions, you can have completely separate directories and have them completely separate. This gets extremely handy when you have a load of jobs on the run at once. Of course you can do the exact same thing in VS with relative ease. I just think the concept is encouraged more in Eclipse. My 2 cents anyways.

To answer your question just learn Java and use Eclipse (or any other IDE, it doesn't matter). Yeah you could use Mono or C++, but really these are kind of 'hackish' ways of doings things. If you are going to start Android, you may as well do it properly and do it in Java. It's like trying to punch a hole in a wall with a screwdriver. You may get there eventually and may do a good job, however it's going to be a lot harder and the finished product is well going to suck most probably. On the other hand you can just use a tool designed for the job and get the job done properly.
Was This Post Helpful? 1
  • +
  • -

#6 DanielLeone  Icon User is offline

  • D.I.C Head

Reputation: 22
  • View blog
  • Posts: 177
  • Joined: 04-February 12

Re: Android Development

Posted 12 July 2012 - 07:18 AM

Thanks guys,

So you've said Eclipse is alright, as long as it has some plug-ins. May I ask what plug-ins in particular?

And you're right, I haven't really used Eclipse, which is why I didn't want to rant on about how terrible it is. Because it isn't.

This post has been edited by DanielLeone: 12 July 2012 - 07:23 AM

Was This Post Helpful? 0
  • +
  • -

#7 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9095
  • View blog
  • Posts: 34,155
  • Joined: 12-June 08

Re: Android Development

Posted 12 July 2012 - 07:21 AM

Typically this is a good thing to follow:

https://developer.an...alling-adt.html
Was This Post Helpful? 0
  • +
  • -

#8 Ryano121  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1362
  • Posts: 3,002
  • Joined: 30-January 11

Re: Android Development

Posted 12 July 2012 - 07:26 AM

Well to be honest it will all depend on your circumstances.

Personally I have a load of plugins to do with Subversion, Maven, JBoss and Spring installed for various projects I've been working on. I also have some code quality plugins (which I don't actually ever use now but yeah) such as FindBugs and CheckStyle. For you however, with Android, I believe there is a specific Android plugin for Eclipse which you should definitely install.

To be honest none of mine are for aesthetic reasons (although I bet there are loads out there) as I don't mind Eclipse how it is. Most of my plugins are to do with specific frameworks or tools that I need to work with that are not built in to Eclipse itself.

This post has been edited by Ryano121: 12 July 2012 - 07:28 AM

Was This Post Helpful? 0
  • +
  • -

#9 DanielLeone  Icon User is offline

  • D.I.C Head

Reputation: 22
  • View blog
  • Posts: 177
  • Joined: 04-February 12

Re: Android Development

Posted 12 July 2012 - 07:40 AM

Okay, thanks,

I'm already following all Google's Developer Tutorials, so I have the Eclipse Plugin for Android.

I have another question about Workspaces though, that I've come across creating a new application.

When I make a new project, you get the option to put it in a Workspace or not.
Taking what you've said about workspaces, does this mean when creating the 'hello world' app, I shouldn't put it in a Workspace because it isn't going to be referencing libraries and what not.


And another thing,
VS has autoComplete or IntelliSense, that was just perfect. Does Eclipse not have it. I hoping there is a plug-in for it, because I like to be able to type something and it show me all the options for what I can do. I find especially when learning, without it, you may find yourself creating methods that already exist and are far more efficient, but you didn't even know they were there.

Thanks again,
Daniel,

This post has been edited by DanielLeone: 12 July 2012 - 07:48 AM

Was This Post Helpful? 0
  • +
  • -

#10 jon.kiparsky  Icon User is offline

  • Pancakes!
  • member icon


Reputation: 7648
  • View blog
  • Posts: 12,902
  • Joined: 19-March 11

Re: Android Development

Posted 12 July 2012 - 07:45 AM

Autocompletion is an abomination, but Eclipse has it. Control-space, I think, brings up the menu if it doesn't pop automatically, and you can configure how it pops.

This post has been edited by jon.kiparsky: 12 July 2012 - 07:46 AM

Was This Post Helpful? 0
  • +
  • -

#11 H3R3T1C  Icon User is offline

  • Android Expert
  • member icon

Reputation: 276
  • View blog
  • Posts: 757
  • Joined: 30-March 07

Re: Android Development

Posted 12 July 2012 - 07:53 AM

Once you have resolved your issues with Eclipse I would like to point out a few things that will make learning Java and more specifically Android easier to learn.
First is that there is a great tutorial series by gabehabe in the Android tutorial section. It starts with Android, Part I: Welcome To Android and I believe it goes to 5 or 6.

Second thing that will help you learn Android is in Eclipse you can open up all the example android apps by selecting File -> New -> Other -> Android Sample Project. Depending on which API levels you have downloaded will determine which sample projects are available. They don't really vary between the different API levels its just that there are added samples for the new API in each API level. I would suggest starting out with API level 1.6 because everything it in that API level works across all android versions!
Was This Post Helpful? 1
  • +
  • -

#12 slehmann101  Icon User is offline

  • D.I.C Head

Reputation: 21
  • View blog
  • Posts: 146
  • Joined: 30-November 11

Re: Android Development

Posted 12 July 2012 - 12:41 PM

as said I don't believe that eclipse should be one of your major issues, while it is far from perfect it isn't half bad. And since C# and Java are so similar it shouldn't take too long for you to get used to Java
Was This Post Helpful? 0
  • +
  • -

#13 Dogstopper  Icon User is offline

  • The Ninjaducky
  • member icon



Reputation: 2871
  • View blog
  • Posts: 11,026
  • Joined: 15-July 08

Re: Android Development

Posted 12 July 2012 - 08:02 PM

Yeah, learn the shortcuts. CTRL + Space will bring up autocomplete. It has instant JIT compilation and underlines problems as they occur. Also CTRL + SHIFT+ O will manage all your imports in a file. Those are just a few.

And you mentioned color. I am one with severe eye strain, so I use a dark theme for my coding. This is what it looks like:
Attached Image

I personally don't care for VS. It does too much for me and guesses wrong far too often. You'll get used to Eclipse.
Was This Post Helpful? 0
  • +
  • -

#14 DanielLeone  Icon User is offline

  • D.I.C Head

Reputation: 22
  • View blog
  • Posts: 177
  • Joined: 04-February 12

Re: Android Development

Posted 12 July 2012 - 11:53 PM

Awesome guys, I installed this for Eclipse, so now I can easily change my Colour Theme which is great.

I'm sure Eclipse is just going to take some getting used to, because I feel the same as gabehabe in the fist part of his tutorial, recommended by H3R3T1C. Thanks.

So I have probably one final question. As I said I'm moving form C# XNA to Java Android. How far back should I be going in tutorials? Like right back to Console, or start with OpenGL, or straight off with Android Development?

And, should I still learn about all the Android xml stuff, even if I'm not really going to be creating UI's? I'm only here for Games :) But I don't want to miss out on important stuff.

Thanks very much once again,
Daniel,

This post has been edited by DanielLeone: 12 July 2012 - 11:53 PM

Was This Post Helpful? 0
  • +
  • -

#15 slehmann101  Icon User is offline

  • D.I.C Head

Reputation: 21
  • View blog
  • Posts: 146
  • Joined: 30-November 11

Re: Android Development

Posted 13 July 2012 - 04:26 PM

Yes you will need to know XML even if it is only at a basic level. Think of start screens, menus and stuff like that. Plus it is something you really need to know. To be honest it should only take you an hour or two to learn.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2