Carlos Sessa

+ Follow
since Apr 17, 2013
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Carlos Sessa

Border en which way?
Can you provide an image?
11 years ago
What do you mean by context problems?
11 years ago
Congratulations to everyone
I hope you find the book useful.
11 years ago
Yep, ViewPager would be an easy way of replacing it.
11 years ago
Why don't you get a graph library?
I think it's too much work to start using primitives over the canvas to draw graphs
11 years ago
The only speed up development time hack is about installing dependencies on the device.
That would allow you to avoid pre-dexing jar files and copying a smaller apk to the device.

Have you tried the intel emulators? They are faster.

Also remember that once the emulator is launched you don't need to close it and start again.

11 years ago
The best example I can think of is the "The SyncAdapter pattern".
It explains a network communication approach which is not well know by android developers.

11 years ago
There is one hack that teaches you how to draw on a canvas but it's pretty simple.

What you are trying to achieve? You might want to add a dependency as cocos2d-x.
11 years ago

Johan Pelgrim wrote:Hi Carlos,


Your book title indicates you have been digging around the source code to find the nitty gritty about the Android Framework. In your opinion, did you see an increase API documentation updates during the time you have written the book and have done your research? What areas are still lacking (in documentation) and contain real gems (which hopefully are described in your book?)

When I browse around the source code I something get the experience Google is taking a considerable amount of effort to work around their own framework. Did you encounter any of those hacks as well? What scared you the most?

How future proof are the hacks described in your book? Are they clean and working 'with' the framework, so we can depend on them in the future. Or are some so hacky they need attention after every new release of the SDK?

Kind regards,


Android documentation has been improving but I feel there are features that lack of it.
My favorite hack in the book is "The SyncAdapter pattern". The sync adapter is an example of lack of documentation and unfortunately it's one of the best android features.

I am scared about private methods in the framework classes
It happened more than once that I tried to extend a framework class and I reached a private method.

Every hack has the minimun SDK version.
Most of them are 1.6+


11 years ago
The logs says your are missing the google-play-services_lib.apk
Does your android device have the google apps installed?
11 years ago

qunfeng wang wrote:Hi Carlos,
I see one hack in the overview page. I'd like to know what the advantages and disadvantages of using Scala instead of Java? Do you use Scala a lot in your daily Android development?

Hack 34 Using Scala inside Android

I worked for a company that had a scala module already coded before starting the android app.
I wrote that hack because I could manage to use it without needing to port it to Java.

Scala is gaining a lot of momentum but unfortunately is not being optimized for Android.
I wouldn't recommend to start from the scratch an android in scala, but it's interesting to know that it works

11 years ago

Steve Luke wrote:I was peaking at the table of contents for the 50 Android Hacks book being featured this week. One that caught my attention was #17 'Creating a wizard form using a Gallery.' The reason that is of interest is that the Gallery is now deprecated. Google offers two options for replacement, the HorizontalScrollView, and the ViewPager, but neither really supports everything the Gallery can do. The main issue with the ViewPager is that it does not allow flings for fast scrolling, and the main problem with HorizontalScrollView is that it does not center-lock.

So for the wizard form, have you looked into the alternatives to see which might be a good replacement? Would you suggest continuing to use the deprecated Gallery (it has flaws, but maybe those aren't so important in a wizard form) or use a ViewPage (not likely to need flings in a wizard. Though wish it could handle view recycling for me)? I assume the HorizontalScrollView is not a good replacement since it does not center-lock which would be a necessity.


You are right, the Gallery widget is deprecated.
When I wrote it the ViewPager wasn't available

I ended up leaving it because it shows different tricks to tweak a view component.
11 years ago

I am all ears
11 years ago