Tuesday, March 31, 2015


Proof for verification

Wednesday, February 11, 2015

Lately I have been working with MediaPlayer on Android. I went to Android docs, read the description of the apis. Great! Let's think a rough algo and start working on the app.

I wrote a simple app which just streams a video and provided media player controls in the app for seeking, play pause etc. Pushed it on my device and goofed around with it. Play, pause working great. Video is streaming nicely. What about seeking? Let's seek to some X position. BAAAAM!!! The whole app became unresponsive. I couldn't interact with my device any more. I thought may be I am doing something wrong so I better review the code. After reviewing I couldn't find anything that I might have been doing on the main thread which could have caused this ANR. I searched the internet and found a few questions on Stackoverflow complaining about the same issue and guess what those questions were posted back in 2011 and 2012. I asked some of those devs and to my surprise they had the assumption of these bugs being fixed long ago, but here I am scolding Google for not fixing the issues and releasing premature api's for the media player.

Let's forget about the UI responsiveness for a bit and focus on other apis. I implemented listeners for buffering callbacks. The algo for the app was developed keeping the documentation of those callbacks in the mind, however when I pushed the app on the device, the behavior of the app was totally unexpected. Forget about stuff that shouldn't be happening, things that should have been happening either never happened or occurred seldom. After extensive testing I found that the behavior of the callbacks was totally undefined. Either Android docs failed to mention other possible scenarios for them or they were the bastard child of the messed up code.

Now I looked towards lollipop in the hope that this crappy behavior might have been resolved in the latest and greatest OS. Google again didn't fail to surprise me. Not only the apis that weren't working on Pre-lollipop devices were still in the same buggy state, the apis that were working stopped working altogether. Now I am sitting ducks, frustrated by the piece of shit Google has provided in the name of Media Player, trying to patch the known issues in my player code making it a spaghetti code.

The only solution I can think of is abandon Media Player and write your own player from the scratch, which is a major pain in the ass or use some open source player.

FUCK YOU Google!!!

Sunday, December 14, 2014

Yesterday I rooted my Nexus 5 running stock lollipop. I bought this phone about 3 weeks ago. Lollipop was supposed to improve power consumption of Android devices but the results I acheived were quite opposite of what Google has been claiming. I barely got 3 hours of SOT & I was facing mic issue as well, which means people at the other end couldn't hear my voice clearly & sometimes my voice was gone completely (during important calls offcourse). I knew it could be fixed by rooting the device & modifying the OS to my liking. So far the results & my findings are not that impressive after rooting & modifying the OS.

I flashed ElementalX kernel with stock settings except I undervolted the CPU to 750 mV. I greenified the culprit apps & started to expect at least 5 hours SOT. However the results were quite below my expectations. I couldn't get more then 4 hours SOT with the following settings & usage patterns.

  • Brightness ~25%
  • Calls = none
  • Gaming = light
  • Music = Medium to heavy use (using earphones)
  • Facebook = medium use
  • Baccon Reader (reddit) = medium use.
  • Chrome = Light use
  • Messaging = none
Considering these settings I could have easily acheived more then 5 hours of SOT but I couldn't come even close to that. This clearly indicates that Google needs to fix its latest OS & these battery draining issues. No matter how much we modify kernel or undervolt the CPU at the end of the day rogue apps & processes will still suck the life out of our precious batteries.

I am still looking for ways to get higher numbers of SOT. If you guys have achieved better results, feel free to share them in the comment section.

Thursday, July 24, 2014

Android wear is cool but it lacks a few major things. There is no way you can switch between opened apps & easy, intuitive way to launch the apps. Swipify is designed to allow you to easily switch between recent apps & launch apps.

Swipify provides an intuitive recent app switcher & a unified launcher like the one you are used to use on your phones .

To switch between recent apps, swipe from the right edge of the screen & to open the launcher, swipe from the left edge of the screen.

There is also a quick settings option in the launcher which lets you easily change the brightness of the screen & see the battery level of your smart watch.

Saturday, July 19, 2014

Being an Android enthusiast, I have written several apps. I had written a utility app to fulfil my need for making navigation through out Android OS easier. The app works just like a launcher. To my surprise this app made me unearth a pretty nifty UI design flaw hidden in a very fragile/dangerous place, the lock screen.

Android allows you to make a call to the emergency numbers in case you can't access or get past the lock screen in dire times. However this accessibility is the culprit for the security flaw in the OS.

Messaging app, A game & browser on the lock screen

Using my launcher, I could access the apps, data & other information on the phone. This can turn into pretty treacherous situation if your phone some how lands in the hands of some perpetrator. The good news is the solution for this flaw is pretty easy & it may already get fixed in the next version of Android.