POSTS TAGGED: Java

Learn About Java Listeners

likeasir2

The path to becoming a great Android developer is not straightforward. To make an application or modify an existing one, you need to know Java. To write a good application, you need to know all of the language’s nuances. Much of this information is available in resources found here on XDA. Applications written in Java use listeners, small functions that launch an activity when you press a certain part of the screen.

XDA Senior Member mohamedrashad wrote a useful guide to help new coders understand listeners better and learn how to use them. The guide explains how to define a button in Java, initialize it, and add a listener to launch the activity. You will also learn how to add Checkboxes and Ra. . . READ ON »

3 comments Read On

Create an External Settings App for SystemUI.APK

red_clock_1

Unlike most other mobile OSes, Android allows users to modify its source code to make the most of it. This is accomplished by editing code from the AOSP or AOSP-derived projects before compiling. However, not all of us build our own ROMs from source. Thus, there’s the world of decompiling and Smali editing.

Here on XDA, developers create amazing things. One new and exciting project allows users to create external controls for SystemUI.APK. The project comes in the form of a guide written by XDA Recognized Developer and Themer serarj, and it allows users to change the look of the status bar and other UI elements on the fly. But rather than simply providing completed applications that accomplish this goa. . . READ ON »

1 comment Read On

How to Create a Java FileFilter with a Picture Guide

i-code-java-300x352-1705306

Java is a programming language that is used to code software for many devices, including Android. It’s criticized by many, but Java is still widely used, mostly because its ability to run properly across many OSes as Windows, Linux, and Mac OS. Quite a few tools available on XDA are written in Java, including the Sony-specific Flashtool application, CASUAL, and so on.

Here at XDA, we’ve already presented a couple of applications, guides, and tutorials for Java. You may have already noticed that Java uses classes to handle various tasks. One such class, FileFilter, was recently presented in the form of a picture guide by XDA Senior Member Beatsleigher. The guide shows you how to write a custom clas. . . READ ON »

1 comment Read On

Meet JOdin3: A Web Tool that Flashes Your Samsung Device

Untitled2

Odin and Heimdall were pretty badass gods in the Nordic mythology. But to Samsung device owners, these are important and powerful tools designed to flash stock ROM files, much like Flashtool on Sony phones. In short, they are an essential part of Samsung Android development here at XDA.

Many times in the past, we’ve talked about XDA Senior Recognized Developer AdamOutler‘s CASUAL, otherwise known as Cross-platform Android Scripting Unified Auxiliary Loader.  The cross-platform Java-based tool allows you to perform many cool tasks like rooting, flashing stock ROMs. and so on.

The project is now on a different level, as Adam has presented JOdin3, a web browser-based and offline flas. . . READ ON »

8 comments Read On

Direct Smali to Java Converter Makes Smali More Developer Friendly

android+eclipse

Android is meant to be open source. And most components, despite being covered by the Apache license, have publicly available source code. Unfortunately, the sad truth is that only Nexus devices owners can do Java modifications without digging into Smali assembler language, which is not simple and needs much more effort than Java. Also, decompiled applications can’t be imported to Eclipse or Android Studio.

There are some tools like GetJava that already can do the job, but in most situations the result isn’t 100% accurate and some files still need to be translated to Java. XDA Senior Member darkguy2008 decided to start a project aimed to provide a better solution than JAD or JD-GUI.

The p. . . READ ON »

2 comments Read On

Learn Some Coding Basics and Become a Famous Developer!

android-code

Many of us would love to become famous programmers like XDA’s Senior Recognized Developers. But coding isn’t easy, and you need to know the basics and have a working knowledge of whatever language you choose before even getting started. And of course, writing a simple “Hello world!” app is not enough, as you will have to look deeper to create more complicated functions.

If you are looking a good place to begin, you should take a look at the guide written by XDA Senior Member Dark Wraith, who gathered some useful information together and wrote a handy guide with commands for many popular languages like C, C++, Java, Python, and BASH.

With the instructions provided in the thread and added acquir. . . READ ON »

no comments Read On

GetJava Helps You Convert APKs into Java Projects

java-android

Android is an operating system that uses a lot of programming languages. The most common languages are Java (or Android Java if you prefer), C, XML, Bash, as well as a few more. Android applications can be decompiled by APKTool and a few similar tools, and their output is Smali. I know that many of you will disagree with me, but Smali is quite complicated language—much more than Java.

There are two tools that can convert Smali back to Java: Dex2Jar and JAD. They are pretty hard to use, though, and need some experience to use them properly. Luckily, XDA Recognized Developer broodplank1337 created a simple bash script, that does all the work for us. This script can get all necessary dependencie. . . READ ON »

6 comments Read On

Online PIT Analysis Tool and Library

Screenshot_from_2013-11-23_21_16_36

About a year ago, we covered a tool by XDA Recognized Developer lyriquidperfection that allows users to create, modify, and analyze Samsung PIT (Partition Information Tables ) files. For those who aren’t familiar with PIT files, they contain all of the relevant information for each partition such as partition id, partition name, flash filename, block size, block range, partition description, and more.

Some time ago, XDA Recognized Developer Benjamin Dobell created a Java-based library for Samsung PIT files, as part of the Heimdall project. Then to further development, Benjamin relinquished copyright over to XDA Senior Recognized Developer AdamOutler, who relicensed the pro. . . READ ON »

no comments Read On

Fling Brings Local PC Media Files to Your Chromecast

fling

We’ve talked quite a bit about the Google Chromecast in the past few weeks. Ever since it was launched a little under a month ago, the little $35 media streamer has lived an exciting life. From gaining root to losing root and from alternate receivers to alternate content providers, there have certainly been more than a few twists and turns. We were even recently shown how to enable ADB on the device, so long as you were one of the lucky few to have obtained and kept root access before the root-killing OTA.

Now, there’s a new application by developer Leon Nicholls called Fling that runs on your desktop computer and sends many formats of local content to your Chromecast device. Fling is a Java applicatio. . . READ ON »

1 comment Read On