O'Reilly logo

50 Android Hacks by Carlos Sessa

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Useful libraries

In this chapter, we’ll cover two third-party libraries. The first one lets you use aspect-oriented programming inside an Android application. The second is a game framework. We’ll walk through what’s possible when you add them to your application.

Hack 31 Aspect-oriented programming in Android: Android v1.6+

Have you ever tried to add analytics, ads, and logs to an Android Activity? If you have, you know that your class can get polluted with a lot of code that has nothing to do with your Activity’s logic. In this hack, you’ll see how to solve this issue using aspect-oriented programming (AOP). As an example, we’ll add a log statement to the Activity’s onCreate() method using AOP to make sure that the Activity doesn’t ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required