• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

Java knowledge needed for Android?

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey I am a beginner in the world of programming,  I would like to know what part of java do I have to learn(I have already studied the fundamentals of java ) as I want to take a career in Android development?
 
Saloon Keeper
Posts: 7548
176
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch.

If you're just starting out with Android, I recommend doing so with Kotlin, not Java. That's the way the Android world is shifting rapidly.

https://developer.android.com/reference/packages lists the core Android APIs; scroll down to find the "java." and "javax." packages you might be familiar with. Notable omissions are AWT, Swing, JDBC and ImageIO, amongst others.

Also note that to become an Android developer, there's a lot more to learn than just a programming language (like the Android API, the GUI, and the Jetpack libraries).

Good luck.
 
Marshal
Posts: 78664
374
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch (again).

You will need to know the basics of programming, and in the case of Java®, which is an object oriented language, the pronciples of object oriented programming too. Don't try to pick subjects and learn them to the exclusion of other topices.
 
Saloon Keeper
Posts: 27486
195
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As Tim Moores has pointed out, Kotlin is slowly replacing Java as the primary development language for Android. However, if you've already got a basic knowledge of Java then it's more a matter of what you don't need to master. Specifically, anything related to Swing, since the Android GUI subsystem is radically different. On the other hand, JDBC is worth knowing, since Android devices tend to rely on the SQLite database.

You also have to be more thread-aware. Desktop Java apps have a main application logic thread and graphics are handled by a subsidiary thread. In Android, the main thread is the graphics thread and you'll sometimes have to outsource things that would have been in the main thread on a desktop app. The worst part is that I think they've tried to deal with the warts that come from that about 5 times and the results seem to get uglier each time.
 
Author
Posts: 13
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:Welcome to the Ranch (again).
Don't try to pick subjects and learn them to the exclusion of other topics.



I like all the answers here, but this is my favorite. It's good to have a well-rounded knowledge of programming. I understand you need to move in a priority list. From what I can recall, here's how I started in Android programming.

1.  Get an overview of the Android app's architecture, how it's built and how it's patched together.  It's made up of components (Activities, Services, BroadcastReceivers, Content Providers). You'll find that these components are classes, but they are so much more than just a compilation unit, the Android runtime treats them more than such. You build an application by creating one or more of these components and then making them talk to each other by sending messages/data (via Intents, which is something you will also need to be very familiar with)

2. Build an app with just one UI (which means 1 Activity class only). In this exercise, you'll discover that Android UI (Activities) are built using two things 1) an XML which describes the UI components and 2) a class that handles app logic and events. Put a TextField and Button View (Views are what Android people call widgets).  Learn how to setup OnClickListeners (Listener classes are how Android handles events)

3. Build on your previous exercise (item 2 above) and create a Thread where you will do the processing once the Button is clicked. In here, you'll learn the many ways how Android can delegate processing to background threads (using Java Threads,  Runnables, Handlers and Messages, AsyncTask etc). And then, you'll also discover that you cannot change the UI when you're in a background thread. So you'll discover the techniques on how to go back to the UI Thread to make changes to the UI

After all these, you'll still have lots of things to learn, but I hope, like me, it would have given you some confidence to move forward. Lots of Java topics in 3 steps above; Basic OOP, Interfaces, Anonymous classes for event handling, Threads.
 
Ranch Hand
Posts: 605
11
Android Python Open BSD VI Editor Slackware
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

arsene Irankunda wrote:Hey I am a beginner in the world of programming,  I would like to know what part of java do I have to learn(I have already studied the fundamentals of java ) as I want to take a career in Android development?


Android is really complex, it takes a lot of enthusiasm to be able to become a senior starting today.
If you are really motivated it could take also 3-5 years before you land to a job, if you are unlucky.
So if you love coding I would consider before a career with Java(that you already know) maybe a Spring backend position, so that you can learn the fundamentals of working in a team, as using GIT, doing testing, and all the issues linked to the Agile,Kanban, Waterfall methodologies. Then in your freetime you can also doing Android, but you will know already the universal best practices developers like.

If instead you really want to learn Android and you want to go through this path I have few suggestions:

1) Have a plan, read every month the job offers and see what is the technical stack that pop up easier, possibly you want to specialize yourself at least in the following things: Retrofit, LiveData, Coroutines, Flow, Compose, ConstraintLayout. Please consider that although online you will found thousands of tutorials of retrofit you may want to be familiar with concepts as `interceptors`, `refresh tokens` and Oauth2, SOLID principles, and guide to app architecture pages in Google Development website

2) Pay  regularly a really experienced tutor that can guide you, in acquiring best practices, and/or if you do not like the idea to pay, follow twitch live code sessions, because most of the tutorials do not teach you how to think, how to find issues on the internet, how to refactor the code, instead in these live long session you can see how typically an experienced developer thinks, the daily real life problems he/she has. There are meetups where you can chat with developers and ask them friendly questions. Few people will repeat you that you need to contribute to a Github project but this is not necessary true because, often you need to be more than junior to do that.

3) Android for some clear and less clear reasons has dozens of libraries and SDK tools to achieve the same thing, and even if you want to become knowledgeable of all the features, you will never be able to master all. I had at the time the fortune to live chat with one of the top three android developers in the world and asking him live questions, he was not shamed to admit that did not know certain specific topic or features, even important ones. So never, never get frustrated because you do not know everything.

4)Head first Android 3th edition is your friend, is a good book to start and grasp the basics, but also updated stuff. Anyway you need to follow also the subject not managed in the book, the ones I indicated you above. You can join the bridge Java Kotlin, following a Kotlin course AND continuously see the Google Development pages, where you can switch with a tab Java and Kotlin. As other people told you,  start to write in Kotlin, but I would add exploiting your knowledge of Java, because in the next 10 years you will come across a lot of Java 7/8 code.

5)Do not just follow tutorials, but write yourself code, and try to cover in every app new aspects. this is the best recommendation I can give you. You will have some code to show, and you will know how to solve similar problems if you write yourself your apps. Do not feel guilty if you will copy and paste  code from stack overflow, medium tutorials, or other Github projects. I know really few seniors that even occasionally secretly do not  "change" code found on the internet.

6) Ask your self if you really want to go through this path

7) Ask again yourself, if you go through headaches and frustration and then bliss because you solved a bug after three days  for a single line of code, then it means that you may like. Android is a great technology that expose you to a lot of nice computer science concepts. At this regard make a note to start to learn algorithms and data structures after the first years, because they help a lot to solve problems, understand code, and catch up with the real thing letting the magic going away, Do not be scared if somethings works and you do not understand why. Do it 20 per cent of the time, I know that good developers may not like what I am recommending you now, but Android is horizontal not vertical, you need really to be knowledgeable with a lot of stuff, understanding the internals or why a reflection Dagger dependency injection works under the hood is not a task a junior can achieve "wasting" time to land to job; learn how to debug but do not get hooked into the internals of android, is common opinion is a complex field, and only after few years you will really understand that. If your aim is to land to job is to be able to build apps, when you are going to be experienced you will be able to understand the why much easier.

Good luck and happy coding new year
 
Joel Salatin has signs on his property that say "Trespassers will be Impressed!" Impressive tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic