Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

New to Android Programming? Stop in here

android

  • Please log in to reply
23 replies to this topic

#1 Parabola

Parabola

    CC Addict

  • Just Joined
  • PipPipPipPipPip
  • 221 posts

Posted 22 August 2011 - 06:08 AM

Alright, I know this could be seen as a tutorial, but I'll let the forum mods decide on that. I'm posting here because, well, as we have seen, many new programmers look in the forums, not just tutorials.
This is a guide that I will be adding on to over time, with notes, links, guides, etc to help new programmers in Android / Java get on their feet and make something useful. Any suggestions or questions are of course gladly accepted and (if need be) answered.

First off, about me:
I do not claim to be an "expert" in Android, but I have worked with it quite a bit. I am currently the lead coder for Android Creative Syndicate, author of the ACS Updater (free app for flashing custom ROMs, Kernels, Themes, etc, etc over the air [OTA]). I emphasize free because, well, I don't want CodeCall to become a market for paid apps, or anything like that. Hence why I'm not even providing links to my app. I love CodeCall too much to want to see it become anything of that sort - I want to keep this place clean :).
I came from a C# background, have been writing in that for years. Always wanted to look into Java, but never had a reason. Until I picked up an Android phone... Now I dream in Java lol.

Ok, so let's get on with my thoughts / direction.
First off, you may as well go ahead and bookmark Android Developers You'll end up scouring there a lot. Also: Android Source Code / Java Documentation Android Source Code and Documentation is a very nice resource I have used many times. It has the source code for the native Android classes, and by using that, you can write your own implementations of various classes. For example, sliders natively are horizontal only. But by extending the class, you can create a vertical one.

Important things to learn before you go off writing some massive app:
The Android Lifecycle -
Very important to learn. If you don't properly end your app, and your app has maybe a background thread that loops (For example, I have one app that, while running, continuously displays the current CPU frequency), and you don't properly handle the onPause, onResume, onDestroy, etc functions, then you could end up with an app that while appearing to be closed, isn't. I wrote that app without ever reading the Android Lifecycle documentation. Because I didn't handle it (I needed to stop the thread during the onPause phase), I ended up with an app that was continuously polling the CPU speed in the background, even though there were no signs of it being open. Talk about battery drain...
Read more on the lifecycle here: http://developer.and...ml<br /><br />Also, you may want to start off learning about the layout xml files. These can be tricky, and I wouldn't rely on the GUI in Eclipse for this, or DroidDraw. While DroidDraw is GREAT for learning, it's not always great for copy and paste into Eclipse. You'll also find (this happened to me once, completely messed up my layout) you want to declare your sdk BEFORE designing your layout. You need to add this into your AndroidManifest.xml:
<uses-sdk android:minSdkVersion="8" />
Of course, change the number to fit your environment.

On that note, make sure your uses-premission and uses-sdk tags are OUTSIDE of the application tag in the manifest, otherwise... they won't work properly.

I'll add more as I think of it, but hopefully this can help you get started. As usual, check out tutorials and sample applications:
DroidDraw : Graphical User Interface Editor for Android Cell Phone Development and Programming
Sample Applications
Tutorials from Android Developer
Tutorials from CodeCall!
  • 6
Programmer (n): An organism that can turn caffeine into code.
Programming would be so much easier without all the users.

#2 PuddingEatsPanda

PuddingEatsPanda

    CC Resident

  • Advanced Member
  • PipPipPipPip
  • 57 posts
  • Programming Language:C++, C#
  • Learning:PHP, JavaScript, Bash, Others

Posted 24 March 2013 - 03:42 PM

Thanks!! The links you provided are helping me bit by bit  :thumbup:


  • 0

Want to learn MOAR


#3 kevinvwallace

kevinvwallace

    CC Lurker

  • New Member
  • Pip
  • 5 posts

Posted 31 July 2013 - 11:22 PM

Thank you so much, your given link helps to Android developer in their Android development project.


  • 0

#4 CMR

CMR

    CC Regular

  • Member
  • PipPipPip
  • 30 posts
  • Programming Language:Java, PHP, (Visual) Basic, JavaScript, Visual Basic .NET
  • Learning:Java, PHP

Posted 24 September 2013 - 08:31 PM

Those links are helpful. I'm new to android programming, I already created some apps for school projects but I want to take my knowledge to the next level. Thanks


  • 0

Constant changing == Technology


#5 Chall

Chall

    CC Addict

  • Senior Member
  • PipPipPipPipPip
  • 349 posts
  • Location:Cedar Rapids, IA
  • Programming Language:Java
  • Learning:C, Java, C++, C#, Python, JavaScript, Assembly

Posted 15 January 2014 - 10:22 PM

Android has an IDE, based on IntelliJ, find it here. http://developer.and...talling/studio.


Edited by Chall, 15 January 2014 - 10:23 PM.

  • 1
Speaks fluent Java

#6 kevinvwallace

kevinvwallace

    CC Lurker

  • New Member
  • Pip
  • 5 posts

Posted 28 January 2014 - 02:12 AM

Thank you for share this post, all the links which provided in this post are very helpful to me. :thumbup1:


  • 0

#7 PuddingEatsPanda

PuddingEatsPanda

    CC Resident

  • Advanced Member
  • PipPipPipPip
  • 57 posts
  • Programming Language:C++, C#
  • Learning:PHP, JavaScript, Bash, Others

Posted 28 January 2014 - 09:10 AM

Android has an IDE, based on IntelliJ, find it here. http://developer.and...talling/studio.

Cool! Thanks! Never knew they had this, Eclipse is kinda buggy XD


  • 0

Want to learn MOAR


#8 farrell2k

farrell2k

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 169 posts

Posted 28 January 2014 - 08:31 PM

Cool! Thanks! Never knew they had this, Eclipse is kinda buggy XD

 

Then stay far away from android studio.  It is very buggy.


  • 0

Averageloser.com - I used to be a programmer like you, then I took a -> in the knee. 


#9 dianemcmillan

dianemcmillan

    CC Lurker

  • New Member
  • Pip
  • 4 posts
  • Programming Language:C++, PHP, PL/SQL

Posted 13 February 2014 - 06:33 PM

Thanks for sharing this! I appreciate it very much. ^_^


  • 0

#10 afifaleom

afifaleom

    CC Lurker

  • New Member
  • Pip
  • 4 posts
  • Location:Dhaka
  • Programming Language:Java, C++, (Visual) Basic, Logo
  • Learning:C++, PHP, Haskell, Others

Posted 06 March 2014 - 09:30 AM

Thanks for share important information that it was needed and get solved from this forum.

Agian thanks eveybody.


  • 0

#11 vijaybansal

vijaybansal

    CC Lurker

  • Just Joined
  • Pip
  • 1 posts

Posted 22 June 2014 - 07:58 PM

Hello,
 
I would like to share my personal experience how i started android app development i hope this small guidence will help freshers.
 
I started my android app development in Jan 2014 after attending one Android Seminar.
 
First i understood the basic Android requirements from developer.android.com/index.html
 
Then i download some of the Android App Development guidance books like "Android App Development for DUMMIES" and many more. I started my basic android app from those books.
 
The main resources for Android App Development are video tutorials it shows you how and where to write code so you can build your perfect 
 
application. Developers can find plenty of Youtube channels on internet but i like this the most youtube.com/user/derekbanas
 
If developers need to understand structure of mobile app then they can download whole Free Android source code from GitHub or other channels so they understands it better. Developers can also follow Android Tutorial Forums and Stackoverflow to develop good android App.
 
I hope you will like my small guidance of how to start android app development? Share comments. 

Edited by vijaybansal, 22 June 2014 - 08:02 PM.

  • 0

#12 MIchsanAbdilah

MIchsanAbdilah

    CC Lurker

  • Just Joined
  • Pip
  • 1 posts

Posted 07 June 2015 - 10:30 PM

thanks you , i helpful to learn android programming


  • 0