Tomek Kondrat · Mar 11, 2014 at 05:30 pm

Learn about Concurrency in Java, and Optimize Your Applications

Understanding the structure of Java code is key to being a good Android programmer. One topic that should be understood better by most developers is concurrency. Every machine can perform more than one task at a time. For example, you are able to listen to music, browse the Internet, and have Android compiling in the background. Java, which is the main language of Android, is perfectly ready to handle more than one process at the same time.

There are two basic units of execution: processes and threads. New CPUs available both on PCs and phones have more than one thread, that’s why some new Intel chips can run up to 12 threads at the same time. The number of processes is greater, and shared among the number of currently available threads. That does not mean that a single-core processor doesn’t support concurrency. It does, but the performance will be lower than on an eight-core machine.

If you want to learn about concurrency in Java, you should check out a guide written by XDA Senior Member sak-venom1997. Sak-venom1997 put forth tremendous effort to thoroughly explain concurrency handling in Java. By following suggestions from this guide, you can get the most performance from your application and optimize it to use all threads available on your device.

The guide can be found in its original thread. If you are an app developer or you are planning to become one, don’t hesitate to go there to learn more.


_________
Want something on the XDA Portal? Send us a tip!
Emil Kako · Feb 26, 2015 at 12:30 pm · 1 comment

What Bugs You Most About Google’s Play Store?

Google announced today that it will be bringing ads to the Play Store, and while that will surely annoy the majority of us, it isn't the only thing that sucks about the Play Store. From the lack of clear communication with developers to ridiculous restrictions, there are a handful of very annoying things about Google's approach. Let us know what bugs you the most about the Play Store.

DISCUSS
Mario Tomás Serrafero · Feb 26, 2015 at 11:32 am · 1 comment

Watches: Luxurious Frivolity vs. Humble Practicality

Smartwatches still have a lot of growing up to do. Not too long ago the latest Canalys figures revealed a rather disappointing outcome for 2014, something we covered with the ultimate conclusion that, once again, smartwatches had no year. The direction of smartwatches is unclear to even the biggest OEMs, and with every new option there seems to be polarizing dissonances from what people and OEMs want and what they both think they want. We've documented many of the reasons as to...

XDA NEWS
Mathew Brack · Feb 26, 2015 at 10:28 am · no comments

Do ISPs Abuse Their Power?

Every day, the majority of us use the internet through several different internet service providers, but what we may not think about whilst using this service is how much control these companies have over our experience. AT&T recently launched their rival to the Google Fiber service and subsequently looked for a way to further monetize on their offering. For an extra $29 on top of the $70 monthly charge, you can buy your privacy back from them. Otherwise expect online adverts...

XDA NEWS
Share This