Profile cover photo
Profile photo
Josip Marković
I do Android. Sometimes I do python.
I do Android. Sometimes I do python.

Josip's posts

Post has shared content
In case you're wondering why your Nexus 6 feels so darn fast and smooth on Android 5.1, besides all the improvements on ART and possibly a lot of code cleaning and optimizations on the Framework - the device is now running full quad-core mode all the time which helps tremendously because the Kernel task scheduler can distribute the workload through all these cores so you'll get the perception that the device is not hanging anymore.

They also disabled the built-in thread migration boost routines - if you don't know what this is about it's a driver made by Qualcomm that receives a notifier from the task scheduler when one thread migrated from one cpu core to another, and to minimize perceived lag it boosted the destination core to the same, or greated, frequency than the origin core:

1 - thread moves from cpu0 to cpu2
2 - driver is notified
3 - reads the current cpu0 frequency
4 - if cpu2 current frequency is less than cpu0's read frequency it boosts cpu2 to that freq, or, if the origin freq is lower than the threshold (which is 1.7GHz by default AFAIK) it boosts to that threshold value.
5 - the boosted frequency on cpu2 stays there for at least 20ms

These migrations can occur dozens of times per-second. One of the things that I did on FK was disabling all this to conserve battery (and we don't really need all that boosting with this chip).
I'm sure Google did the math and a lot of power measurements and found out that the gains outgain the losses, so they disabled this, and I applaud them.

So these two changes balance themselves out, and I can imagine that 100% stock users will be pleasantly surprised by the improved battery life.

Unfortunately we're still dealing with full 3 second cpu boost on touch events... we don't need long of a boost, specially at 1.5GHz... Comon Google.

I don't know what other improvements they did on the Kernel, the source is not up yet, this is all I know for now.

Post has attachment
Preporuka svima je da prate postove na /r/androiddev subredditu.
Tamo se nerijetko može naletjeti na Google ekipu poput Tor Norbye i Chet Haase (koji inače vode jako dobar Android Developer Podcast: Jako često se pojavi i Jake Wharton, osoba koja je sudjelovala u stvaranju najkorištenijih biblioteka.

Uglavnom se tamo akumuliraju vijesti bitne za developere, ima ekipe s različitim iskustvima i generalno je dobar i zdrav community.

Post has shared content
Kotlin may be a good choice for a second language.
Using Project Kotlin for Android

I've been watching and playing with Kotlin for about two years now. It's gotten to the point where I think it's really viable for Android app development. I decided to take a few nights and dig into a bunch of details about the language and why it's a good candidate.

This is a slightly modified copy of a document I presented internally at Square. We're not going to turn around and write everything in Kotlin. That wouldn't make sense. This was a sell on the language, features, and its implementation such that we can start experimenting.

Since I'm not interested in hearing people yell things that I already know about their favorite non-Java languages, comments are off and closed on this post. I've used Groovy and Scala a bunch, but thanks. I haven't used Xtend or Ceylon at all (hence their omission). If you're interested in discussing those, make your own post.

#AndroidDev #Kotlin #NotScala

Post has shared content
Collapsing Toolbar Title

I finally got around to tidying up my collapsing Toolbar title code today. It's pretty simple to use. 

Just wrap your Toolbar in a CollapsingTitleLayout. From then on, you should update the title via setTitle(), and change the scroll position as needed via setScrollOffset().

There are improvements to be made in the API and text layout, but it's pretty usable now.

One thing to note, the sample image has the background collapsing with the title. This is not provided by this layout, you'll need to do it yourself. It does clip the background though.


#AndroidDev   #Material  
Animated Photo

Post has attachment
I've just unlocked #OneDrive on Drive by #Jolicloud. Get extra free storage here

Post has shared content
Get paranoid, yeah!
4.6 BETA 4 - Release Humble Huckleberry

We had to delay the release a bit this week due to some device specific mishaps that were discovered in the final review stage of the builds. As those issues have been resolved, we are happy to announce a pair of delightful changes.

We are making the edit mode of Quick Settings a bit more unified by getting rid of the split between the standard tiles and the temporary tiles such as the remote display/cast tile and the alarm tile. This means you can now hide those tiles and move them around to reorganize the screen just as you want it to be.

We are adding a new default AOSPA wallpaper. This is going to be most prominent for new users but you, experienced user, might be interested in checking it out as well. It is available as the first item on Google Now Launcher backgrounds list and also visible as a part of the "Backgrounds" app choice in other launchers such as Nova.

Please note: The default wallpaper is a bit special on the system and you might still see the old thumbnail. One way to resolve this is to do a clean flash with a factory reset (wiping of userdata). A different, more clean approach is to ask the relevant files to be removed which can be done by flashing like you would normally do and then either
a) opening a terminal/command prompt on your computer, connecting your device up to it and running: adb shell su -c 'rm -f /data/data/; rm -f /data/data/'
b) opening a terminal emulator on your device and running: su -c 'rm -f /data/data/; rm -f /data/data/'

As usual - have fun and #stayparanoid!

The change log:
- Make all Quick Settings tiles act similarly in edit mode
- Add a new default AOSPA wallpaper
- Improve speed and stability of the core
- Adapt to the Peek standalone application package name change

Bug Reports:
Official Community:
Legacy Community (For devices which are not listed on official site):

Post has shared content
After struggling with trying to figure out how various pieces fit together, I've done some research and put together the complete Android Activity/Fragment lifecycle chart. This has two parallel lifecycles (activities and fragments) which are organized vertically by time. Lifecycle stages will occur in the vertical order in which they're displayed, across activities and fragments. In this way, you can see how your fragments interact with your activities.

In addition to the attached image, I've also got an SVG: which is suitable for printing.

If this is missing lifecycle steps or is inaccurate in any way, let me know so I can update it!

#Android #androiddev  

I've written a beginner DevBlog about using Autolayout in iOS. Check it out!

Post has shared content
Hey, with gnome-tweak-tool and the dock extension, gnome-3.2 is starting to look almost usable.

Now I just hope those things become part of the standard gnome shell setup and made available in the regular "system config" thing rather than hidden off. Sure, make them default to off if you want that "clean default", but make them easy to find and part of the standard install.

Or would that be too close to "Ok, we admit we were wong" and thus not politically acceptable?

Post has shared content
Great, Android specific podcast from people that develop Android 
Are there any geeks out there interested in new podcasts? What about podcasts about Android development?

+Tor Norbye and I are proud to announce a new podcast we've started called Android Backstage. It's a podcast by and for Android programmers, featuring engineers on the Android team at Google talking about features, APIs, and technologies that we think are important for developers to know about. Or which we find interesting. Or which randomly happened to come up on the show.

If your podcast client still has room and you have an extra half-hour (ish) every month (ish), then subscribe and tune in. You can find the podcast on Feedburner.

This inaugural episode is about Android KitKat, with Tor and I talking about some of the new features in the latest release. In future episodes of the podcast, we'll interview other engineers on the team to deep-dive technologies they've worked on. Android development info, straight from the source.
Wait while more posts are being loaded