proguard-android.txt is missing

> java.io.FileNotFoundException: \android-sdk\sdk\tools\proguard\proguard-android.txt

Wondering where is “proguard-android.txt” in the lates ADT (rev 23)?
No worries! The universe is not collapsing. It is just a packaging bug! :)

https://code.google.com/p/android/issues/detail?id=72400

Download your own local copy or proguard-android.txt

secret

Medium post about “Secret” infrastructure. It’s Google App Engine and Go! Unsurprisingly… it is created by Google Engineer:)

Read more:
https://medium.com/secret-den/demystifying-secret-12ab82fda29f

//DL

Android Arsenal

That’s quite good collection!
“A categorised directory of libraries and tools for Android”

http://android-arsenal.com/

Contribute what you have in your bookmarks!:)

//DL

Foursquare like map animation (sliding panel) with ListView

If you are wondering how to achieve map and listview behaviour like in Foursquare – this post is for you.
Here’s a short video what I’m talking about:

Continue reading

Android Activity Lifecycle

This is very old topic. Back to 2009 – some day I promised to myself to read android javadoc method by method. I didn’t:) So even now from time to time I find interesting methods in interesting places. Like onUserLeaveHint() and onUserInteraction() in Activity (API v3).

Anyway, here is an interesting picture of complete Activity Lifecycle originally posted on G+. Just found it on reddit today.

complete android fragment activity lifecycle

http://staticfree.info/~steve/complete_android_fragment_lifecycle.png

just in case you missed it

//DL

Android Map v2 clustering

Just a quick reference for different Android Map clustering solutions:

android clustering

//DL

instrumentTestCompile

In case you get this error:

Build script error, unsupported Gradle DSL method found: ‘instrumentTestCompile()’!
Possible causes could be:
- you are using Gradle version where the method is absent
- you didn’t apply Gradle plugin which provides the method
- or there is a mistake in a build script

instrumentTestCompile() was renamed to androidTestCompile() in the latest version of gradle plugin

Here is a guide http://tools.android.com/tech-docs/new-build-system/migrating_to_09
//DL

Phone SMS verification for your project

twillio

If you are developing mobile application that needs phone verification – Twilio is a good start point. They also have a promotion for Google Cloud Platform http://ahoy.twilio.com/googlecloudplatform.

Here is an article how to integrate Twilio to your Google AppEngine project https://developers.google.com/appengine/articles/twilio. Upd: seems this code doesn’t work anymore

I’ve recently tried to integrate the latest Twilio python library to my GAE application. Version 3.6.2 fails with NotSupportedOnThisPlatform – Google Cloud Platform doesn’t support certificates in httplib2. Use 3.5.2 version instead.

//DL

Developing for Amazon Kindle Fire

amazon kindle fire

Kindle Fire development could be a little bit tricky. There are five different device configurations available.
One device has a little bit strange config. It is sw533dp (smallestWidth) because of 1280×800 resolution with hdpi density.

I’ve summarized info to the table:

resolution dpi size sw
Kindle Fire HDX 8.9″ 2560×1600 xhdpi xlarge sw800
Kindle Fire HDX 7″ 1920×1200 xhdpi large sw600
Kindle Fire HD 7″ (2nd/3rd gen) 1280×800 hdpi large sw533
Kindle Fire HD 8.9″ 1920×1200 hdpi xlarge sw800
Kindle Fire (1st/2nd gen) 1024×600 mdpi large sw600
Nexus 7 1280×800 tvdpi large sw600
Nexus 10 2560×1600 xhdpi xlarge sw800
So you may consider to have something like drawable-sw533dp or layout-sw533dp in your project.

How to generate unique device id

android device id

At some point of time you will need seamless user/device identification for your application.

It is not so simple to generate unique device id on Android because of:

  1. multiple Android versions
  2. Google bugs
  3. root
  4. custom ROM modifications with bad Build.SERIAL or ANDROID_ID
  5. multiuser support (4.2 and up)

First of all you can start with this:

  1. Google blog post “Identifying App Installations” http://android-developers.blogspot.ru/2011/03/identifying-app-installations.html
  2. Read stack overflow discussions http://stackoverflow.com/questions/2785485/is-there-a-unique-android-device-id
  3. Read Samsung documentation http://developer.samsung.com/android/technical-docs/How-to-retrieve-the-Device-Unique-ID-from-android-device

Be aware that ANDROID_ID could be changed after user switch (multiuser in 4.2)

Continue reading

© 2014 Android Tales

Theme by Anders NorenUp ↑