Posted on by Tobias Knell | Posted in Developer Blog, Mobile Blog, Tutorial | Tagged , , , ,


In my previous post, I showed you the basic setup for android with maven using the android-maven-plugin. Now I'll show you how to configure it to make releases with maven, and how to configure the plugins to save you some work.

Configuring the keystore data

If you have used the release archetype like in the previous post, most of the work is already done. The necessary plugins are configured and only need some additional data, like the data for your release keystore.

Looking into the poms, you'll find the property keys, you have to provide:


Posted on by Tobias Knell | Posted in Developer Blog, Mobile Blog, Tutorial | Tagged , , , , ,


Building and managing Android projects with maven is not as easy as it could be. So in this blog, I'll show you how we managed to get it work nicely.

In this example, we'll create a parent project with an app module and a separate instrumentation tests module.

Project setup

The quickest approach to create a new Android project with maven is using a maven archetype from aquinet (http://mvnrepository.com/artifact/de.akquinet.android.archetypes).
For this project, we'll use the android-release archetype, as it creates a skeleton for exactly our case, as we also want to release the app with maven.


Posted on by Tobias Knell | Posted in Mobile Blog, Tutorial | Tagged , , , , , , ,


We had a case in an internal app, where on Phones only the Portrait mode should be possible and on Tablets only the Landscape mode. So I googled a bit and tried out some things, and here is the solution I found for this problem.

First, in each Activiy in the AndroidManifest (or each Activity that should have this behaviour, but I prefer a consistent behaviour for the whole app), declare the following:

android:screenOrientation="nosensor"

This will prevent the Activity to switch orientations if the user rotates the device.
Then create a BaseActivity that all your Activities will be extending. In the onCreate we'll do the other part of the trick.


Posted on by Tobias Knell | Posted in Mobile Blog, Tutorial | Tagged , , , , , ,


Within the scope of some Android R&D I took a look at Google's Cloud Message Service, GCM.

Well, the starter guide at http://developer.android.com/google/gcm/gs.html is almost all you need to get started, so I'll explain my setup and some further instructions for a small test case.

In case you already decided to setup GCM for yourself: make sure to do the guide above until you reach the 'Writing the Android Application' part.

 


Posted on by Tobias Knell | Posted in Mobile Blog, Tutorial | Tagged , , , , , , ,


In today's tutorial I'd like to show you how to implement a ListView, that only displays a limited number of entries. With a button at the end of the list, the user can load more entries.

To achieve this goal, we first need to implement a basic Adapter that provides our ListView with the entries:


Posted on by Joachim Arrasz | Posted in synyx Blog | Tagged , , , , , , , , ,


Dieses Jahr hatte unsere Mobile Developer Reisegruppe das Glück die MDC 2012 quasi vor der Haustüre, nämlich in Stuttgart, vorzufinden. Das machte den Besuch natürlich noch viel reizvoller. Darüber hinaus kündigte sich mit Robert Virkus,  dem  Gründer eines unserer Partnerunternehmens, Enough Software aus Bremen, ein spannender Talk über das , meiner Meinung nach derzeit heißeste Thema im Mobile Bereich, an. Doch dazu später mehr.

Weitere spannende Talks versprachen Markus Jungingers GreenDAO Talk und natürlich auch Lars Vogel seine angekündigte Übersicht über die Neuerungen von Android 4(.2)

Da unsere Gruppe aus iOS als auch Android Developern bestand war schnell klar, dass man sich unterschiedliche Talks anschauen möchte.


Posted on by Tobias Knell | Posted in Mobile Blog, Tutorial | Tagged , , , ,


In a recent project I encountered a problem with SQLite on android 2.1. On later versions, my code worked perfectly, but on 2.1 it crashed every time when trying to get a column from a cursor.

Here's the simplified code:


Posted on by Tobias Knell | Posted in Mobile Blog, Tutorial | Tagged , , ,


In my last project I needed to implement a ListView with rounded corners, because the app had to be supplied for Android and iPhone and they needed to look somewhat alike.
In this blogpost, I want to show you how I've implemented it and hopefully help some people who also want to use ListViews with rounded corners:

First off, we need the drawables for the backgrounds of the Lists entries:

For the entries in the middle of the list, we don't need rounded corners, so create a xml in your drawable folder "list_entry_middle.xml" with following content:


Posted on by Tobias Knell | Posted in Mobile Blog | Tagged , , ,


For an upcoming, probably large mobile project, I was asked to look at the current situation on mobile multiplatform frameworks that cover at least Android and iOS and provide access to some native API's like the camera. So I looked at several of the available frameworks, but only two of them fulfilled all requirements while also providing advantages towards other ones.

phonegap_logoFirst there is PhoneGap (http://www.phonegap.com/) which additionally provides you a buildservice in their cloud (https://build.phonegap.com/ - currently in beta), to which you can upload your project and it builds your Apps for Android, iOS, BlackBerry OS, Palm OS and Symbian. PhoneGap furthermore supports Windows Mobile and will be supporting Bada and MeeGo in the future. For an overview of the supported features on the different platforms, check this site: http://www.phonegap.com/features


Posted on by Florian Krupicka | Posted in Mobile Blog, Tutorial | Tagged , , ,


When prototyping Android activities with a lot of view elements, the onCreate method can quickly become cluttered. Setup code that simply retrieves the views from the declarative layout (by using findViewById(int id)) quickly fills up your code. Similar, small helper classes need to be instantiated and configured, though this code is not -- strictly speaking -- part of the actual functionality of your activity class. Time to refactor and make your activity concentrate on it's actual task again!