"A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects." (Robert A. Heinlein)
Showing posts with label Android. Show all posts
Showing posts with label Android. Show all posts

Saturday, 27 May 2017

New toy on the desk: Galaxy tab A6

At least I gave up and decided for buying myself a tablet. I've always been more favorable towards netbooks instead of tablets mostly because real computers, even under-powered, better suits the way I use them: mostly writing documents and programming. I didn't entirely changed my mind but I have to reckon a tablet can have many uses where it perform superbly like browsing the Internet or keeping in contact with e-mail or the many social media applications. Last but not least I needed a modern device for studying and testing Android development, so here I am ...

Monday, 17 October 2016

LibGDX: The “Swiss Army Knife” of Java Games Programming


My few readers might remember I sometimes explore, and play with, game engines and libraries. I suppose it's a sort of “compensation” for my everyday work with not-so-exciting middle-ware and web-services projects. I already posted about Slick2D libraries for Java games but I was looking for something more complete and, most of all, that would allow me to develop also Android applications.
LibGDX is a Java game-engine that provide a vast variety of features for developing games. It's mostly aimed to 2D games development but it even provides some 3D features. In addition LibGDX can deploy games on different platforms like Java desktop or Applet, Android, HTML5 and IOS (with some extra requirement due to peculiar Apple developing policies). Last but not least a LibGDX project can include additional extension libraries helping to develop different aspects of game programming like AI, physics or networking (and this is the why of this post title).

First project creation

You don't have to download the whole LibGDX project in order to start to develop. LibGDX people suggest using the handy utility they provide, LibGDX Project Setup, in order to generate a skeleton project. The generated project will be based on the Gradle building tool that will think about downloading from the Internet all needed libraries and their dependencies.

Wednesday, 4 December 2013

Fun programming: Andengine


Here I am back on the “Fun programming” theme: finding ways to have some fun while programming. A way I use to detach myself from daily routine while seeking for new techniques or languages to learn. While visiting back this blog I noticed many articles about Andengine: a promising 2D games engine for Android developed by Nicolas Gramich.

Setting-Up Andengine

The starting point so set-up a working Andengine environment is to have a working Android development set-up based on Eclipse and Android SDK. I had prepared it before during my previous Android experiments. Also is needed a Git plug-in for Eclipse, like EGit.

Andengine is available as a Android library project it can be easily downloaded from its GitHub page by selecting Eclipse import wizard (Choosing the “File → Import …” menu first then the “Git → Projects from Git” option).
After copying the project URI in the wizard request …
The project branch must be selected, I did choose the GLES2 branch the latest and the one currently under develop.

Tuesday, 13 November 2012

Android programming : Exploring sensors

Sensors are one of the the things that make mobile development different, and interesting, from the programming of our desktop computers. Modern mobile devices with their combined capabilities of communicating, imaging and sensing surrounding environment looks more like a pocket version of a artificial satellite than a desktop computer. This is why, after initial hello-worlding, the first thing I've been looking for in the 'net has been how to read sensors in an Android application. I got several examples like here, all showing how to read a single sensor. I decided so to make more interesting these basic examples in order to build a simple user interface able to discover and read available sensors on a device.

The user interface design

After reading about sensors on Android worked I refined my idea on how the user interface: a selector (also known as spinner) on the top filled with available sensors list, some details on the selected sensor just under the selector and sensors values updating on the bottom.
User interfaces (activities) layout is defined, in Android programming, trough a XML file. Eclipse Android development plug-in provides a handy graphical user interface to arrange activity layout. It worked for me well enough even if I went to manual XML editing a couple of times just to make things a little faster. Eclipse plug-in also provide a lot of useful warnings, to a beginner like me, like reminding not to place hard-coded strings in your interface. By the way here is, at last, my interface definition.

Saturday, 13 October 2012

Android Development on Netbeans (and the EEEPC)


In my previous post I moved my first steps in Android development world by installing Android SDK and Eclipse IDE on my desktop computer. After successfully writing my first Android hello-world I went, almost immediately, on how to do Android development on the EEEPC 900. If it's true the desktop computer is much more suited for writing code it's the EEEPC tho one I always bring with me and I use for my experiments.
I'm a big fan of Eclipse and I use it everyday at work but, when it comes using it on a netbook, it performs very poorly. Worst of all some Eclipse configuration windows are too big to fit into the small EEEPC screen and even lack of scroll-bars. This is why I use Netbeans on the EEEPC. After a brief looking-up on the 'net I came to NBAnroid plug-in page.

Installing Netbeans to 7.2

Even if it isn't required I decided to upgrade my Netbeans installation to the latest 7.2 version. I so removed previous version by launching Netbeans removal script
sudo /usr/local/netbeans-7.1.2/uninstall.sh
then I downloaded latest Netbeans version from its download page and launched the auto-installing script
chmod +x netbeans-7.2-ml-javase-linux.sh
sudo ./netbeans-7.2-ml-javase-linux.sh
this started the usual Netbeans installation wizard 
after some “I agree” and several “Next” I got the new version installed.

Installing Android SDK

Like in my previous post I downloaded Android SDK from Google's page and extracted it on my home folder
mkdir android
mv Downloads/android-sdk_r20.0.3-linux.tgz android/
cd android/
tar -xf android-sdk_r20.0.3-linux.tgz

Saturday, 29 September 2012

The many steps of an Android Hello-World


As I promised on my last post, I couldn't resist not to write at least a hello-world application on my new phone. I went so through the, a bit long, task of installing the Android developer tools and writing my first program with it. I followed, step-by-step, instructions provided from Google Android SDK how-to pages. As a start I installed on my desktop computer but, soon, I'll try installing Android SDK on the EEEPC too.

Installation

The first step I took has been, of course, installing Eclipse IDE, a quite plain install from the software centre apart from some compatibility problem with Oracle Java 7. I had to revert to OpenJDK as default JVM in order to make Eclipse start.
The second step has been downloading and extracting Google's Android SDK. I though, at the beginning, about installing on a system folder like “/opt”, until I discovered that Android's Eclipse plug-in takes care of downloading and upgrading files on the SDK folder. I so went back to installing it on my home folder since running Eclipse as root user every time you have to do an upgrade is far from being advisable. By the way installing the SDK has only matter of extracting the downloaded file:
tar -xf android-sdk_r20.0.3-linux.tgz
Then I started Eclipse and selected the “Install new software” option from the “Help” menu opening the plug-in installation form. Here I added Google plug-in update URL (with the “Add...” button) and selected all the “Developer tools” items.

Sunday, 9 September 2012

New toy on the desk: LG L3 Optimus E400


I'm not easy at changing my devices, unless they stop working. This time I did sort of an exception and after only a little more of two years I decided to change my (still doing its job) Nokia 5800 XM. Android phones always attracted me, since I first heard of Google promoting this new operating system, but price kept me from buying one since now. After having a look at the (not many) low priced models available here in Genoa my choice fell on the LG L3 Optimus E400. The phones I evaluated had roughly the same features and price so, at last, had been the plain metal-black design of the LG phone that triggered my choice. I'm not usually design-driven in my choices but when design is the only difference ...
By the way the new phone does all the old phone did even if the camera quality is far from what the old Nokia had. Is not new that thin bodies and good lenses are things that hardly go well together.
I'm not going to become a mobile developer tomorrow but ... be sure I'll post some hello-world in android as soon I'll find the time.