Geek Garage

Find inspiration in awesome ideas.

Tag: Android Page 1 of 2

Using the Dropbox SDK with Android Studio and Gradle

Dropbox DeveloperDropbox provides a set of interesting online services. Last year, they released a nice feature, the Datastore API. The documentation is good, but meant for using with Eclipse. If like me, you are using Android Studio, you will have to look for some more steps to make this working.

I gathered all of them into this single post.

Read More

Android, how to programmatically get a ressource

BIG T3 view

On BIG T3, the flags are resources loaded dynamically.

This was my problem: in the application Brothers In Games T3, I needed to display some images depending on a parameter. Those images are country flags and are the one of the country where the event is located. Those flags images are resources stored in the app. Their name is standardized with the country ISO code.

Now, how to load a resource when you have to compose its name ? I mean something more elegant than a brute if country then load resource elsif other country…

Fortunately, Android offers an elegant and easy way to do so, but maybe not that obvious, so lets see how it works.

Read More

Referencing a local aar file in Android Studio

If you have created a library in Android Studio, you certainly want to use it in another project. The easiest way should be to create the aar file and then reference it from your new project. Prior to Android Studio 0.4.4, referencing local aar files was not supported as you can see from Xavier Ducrohet or in this issue report.

But there is an easy workaround for this. Lets see what we have to do, lets say, after you’ve created a stand alone library.

Read More

Date manipulation curse from Java in Android

Java does certainly have the reputation of the worst date manipulation features. This all comes with the bad designed Calendar API. Hopefully, there are better third-party APIs and if you have to manipulate dates, moment, times… You certainly prefer JodaTime. From my point of view, it’s a no brainer.

I was working on a date picker for an Android project and found that the SDK provided a set of convenient methods and interfaces. But this lead to a little bug in the interface, a little shift in the displayed date. Of course, this comes from the old Java Calendar API curse and from a lack of precision in the documentation.

Read More

Parsing RSS feed from an Android device

When it comes to RSS feed parsing, any Java developer will use the org.xml.sax library. But Android provides a nice wrapper that simplifies the code without sacrificing the performances. This wrapper is present since API level 1 and is the easiest way to write a simple parser for any XML.

In this tutorial, I’ll show you how to parse a RSS feed using the android.sax package. I’ll use Geek Garage’s feed. As any XML parsing, using the android.sax package, you can ignore the elements you don’t need, so, I’ll only collect some of the items.

Read More

Create a standalone library with Android Studio

As a software developer, you know that reusable ressources should be in libraries. Android is a Java-based technology, so, your library can be a jar file. But if you want to store some Android specific resources, you need to create a Android Library Project.

Google released Android Studio as the main development platform for Android. Android Studio is a packages IntelliJ Idea environment and relies on Gradle for the build management. At the time being, it is a little unclear how to manage a library so this is a first tutorial.

Read More

How to respectfully get your user contact details ?

My app KipinTooch is a kind of contact management app. I created it with the following intentions:

  • Have a better view among the common informations from different contacts.
  • Highlight the relations between contacts.
  • Allow a batch modification for those informations.
  • Help filling informations in a contact card based on similar contacts.

I also wanted the starting point to be the user. So, the app need to gather some informations about the user. But I also wanted the app to be self-sufficient. The app should process data from the phone and everything is done on the phone. No third party social network, no sending to a unknown distant server which would do its magic. This is what I call to be respectful: the user private data remains private and on its device.

This mean that if you want to provide the user some similar informations, you can only rely on what’s on the device. In this post, I will show you how you can gather those informations.

Read More

Format your string resources on Android

There are many tutorials on the web about String formatting on Android. Unfortunately, most of them are about the usual String.format method. In this post, I’ll show you the different ways to display your message.

Read More

The Iron Kingdoms on Kindle.

Skull Island Expeditions is an imprint of Privateer Press producing fantasy fiction. Their first 3 novels are now available on Kindle trough the Amazon.

The Devil's Pay cover.

The Devil’s Pay cover.

Privateer Press is certainly the first table top miniature games company to take advantage of modern devices. War Room, their card library app was published last summer. This April, trough Skull Island Expeditions, they are focusing on publishing books on digital format.

Their first 3 books are available on Kindle for a reasonable price, $5.14. Kindle is not limited to Amazon’s tablets. You can find the app for your Android or iOS device. You are allowed to get the book on multiple devices so you can start reading on one and continue on another. You are also allowed to lend the book.

You can still save $0.15 per book if you want to buy them trough Skull Island Expeditions site. The books are available in pdf, mobi or epub.

If you want to dive deeper in the universe of the Iron Kingdoms, those books are for you. Feel free to tell us how you enjoyed them.

Samsung Galaxy S 4 Unpack

Galaxy S4 black

The Galaxy S 4 in black.

The Samsung Galaxy S 4 Unpack event just finished. It will certainly remain in history as the worst show ever. But no matter, we watched it for the product, the new Galaxy S 4. First, this was a Samsung product presentation, if you expected something about Android, forget it. The first time we heard Android was after 47 minutes and we’ll only see the Play Store icon in a glimpse. This is expected as for every manufacturer, Android is disappearing. But still, the S 4 will come with Android 4.2.2 JellyBean, so up to date.

Of course, the S4 does have a better hardware. Samsung is a manufacturer, so the first thing we expect is the hardware. But for real details, we’ll have to wait for the benchmarks. All this event focused on the software layer. The new Galaxy S4 is not only a new phone, it is a full Samsung product with its own softwares.

Read More

Page 1 of 2

Powered by WordPress & Theme by Anders Norén