Profile cover photo
Profile photo
Tobias Preuss
430 followers -
Android Developer based in Berlin; fascinated about geospatial data
Android Developer based in Berlin; fascinated about geospatial data

430 followers
About
Communities and Collections
View all
Posts

Post is pinned.Post has attachment
Eliminating Code Overhead

Great talk on reasonable optimization by +Jake Wharton. Thank you for sharing!

+ Video: https://youtu.be/b6zKBZcg5fk
+ Slides: https://speakerdeck.com/jakewharton/eliminating-code-overhead-square-hq-2015
Photo

Post has attachment
Gradle each

This shell script executes the given Gradle tasks on a range of commits.

https://github.com/johnjohndoe/gradle-each

I hope you find it as useful as I do.

#gtd #considereduseful #androiddev
Photo

Post has shared content
I was getting annoyed of turning development phones either on or off. So I wrote an app that makes sure to keep the screen on when I am developing. And it allows the phone to sleep when I stop my development.

#android
Stay-awake on adb
Stay-awake on adb
play.google.com

Android poll: JSON parser/processor

Which JSON parser/processor do you favor in your Android projects? If other please specify.

https://twitter.com/tbsprs/status/819535277639118848

#androiddev #androidpoll

Post has attachment
Why I don't use Robolectric

by Matt Dupree

Make testing easier: listening to tests & move application specific logic to a layer that’s higher than the Android SDK

#androiddev #tdd

Post has shared content
Android SDK Platform-Tools as a separate download

Android SDK Platform-Tools is a component for the Android SDK. It includes tools that interface with the Android platform, such as adb, fastboot, and systrace. These tools are required for Android app development. They're also needed if you want to unlock your device bootloader and flash it with a new system image.
Ever wanted to download adb or fastboot without having to download the whole of Android Studio?

...but didn't want to download executables from some random warez site?

Good news this week:

https://developer.android.com/studio/releases/platform-tools.html

The links on that page will always return the adb/fastboot binaries currently shipping with Android Studio. No need to guess what the current version is, or update your own links: just follow these and get the latest binaries, direct from the source.

This is thanks to +Siva Velusamy and Kevin Quinn, not me.

(2017-01-09: Replaced the three direct links with the link to the new page, which will also include brief release notes.)

Post has attachment
How to convert an Android hprof to “Callgrind Profile Data”

I would like to analyze an Android heap dump which I exported via LeakCanary [1] with Callgrind (KCachegrind on Linux, QCachegrind on MacOS) [2]. The input format for Callgrind is "Callgrind Profile Data". The heap dump comes as a .hprof file.

I know how I can convert the Android .hprof into a "standard" .hprof:

$ hprof-conv android.hprof standard.hprof

The standard.hprof then can be read by Eclipse Memory Analyzer [3].

However, Callgrind does not allow to open the file. I found converters [4] in the source packages but none of them seem to fit for what I look for. How can I convert it into a suitable format?

___
[1] https://github.com/square/leakcanary
[2] https://kcachegrind.github.io/
[3] http://www.eclipse.org/mat/
[4] https://cgit.kde.org/kcachegrind.git/tree/converters

Post has attachment
ActivityLifecycleCallbacks are not triggered when activity is killed through “Don't keep activities”

As soon as I enable Don't keep activities in the developer options the desired onActivityStarted is missing.

Post has attachment
Exploring Java's Hidden Costs

In Android Studio in Lint in enable: "Private member access between outer and inner class"!

https://realm.io/news/360andev-jake-wharton-java-hidden-costs-android/

via +Jake Wharton

#dexcount
Photo

Post has attachment
Google Maps Android API - finally bug fixes

Release: August 1, 2016

Finally, after almost four years (since Dec 5, 2012) Google fixes two major pain points in the Maps API. Both issues have continuously been reported by users over the years.

+ Issue 4650: Add Tag / Identifier to Markers
https://code.google.com/p/gmaps-api-issues/issues/detail?id=4650

+ Issue 4636: Add drag, dragStart, dragEnd handlers
https://code.google.com/p/gmaps-api-issues/issues/detail?id=4636

The fix is described in the release notes linked to this post. Google also provides examples for both feature additions.
https://developers.google.com/maps/documentation/android-api/marker#marker-data
https://developers.google.com/maps/documentation/android-api/events#camera-change-events

Thank you, Google (whatever took you so long ...)

/cc +Cyril Mottier
Wait while more posts are being loaded