Guava RateLimiter to control the frequency of events

Having a long running process, consisting of many small, fast steps, updating its listeners after processing each step? Assume that you process the list of thousands items in a thread and want to show each processed item to the user. Processing each item is very fast, so the updates will be send to the GUI … Continue reading Guava RateLimiter to control the frequency of events

Android status bar notifications [complete tutorial with source code]

Displaying status bar notification is a common way to unobtrusively inform user that something has happened (like new GMail message notification). In your app you can display it whenever you want. I will guide you how to do it from basics. This is how notifications are presented to the user: Google's documentation regarding the notifications … Continue reading Android status bar notifications [complete tutorial with source code]

iOS: Timer countdown implementation tutorial (including source code)

This lesson shows how to build timed periodic updates in iOS app using NSTimer. In my example I update timer value in text label. GUI consists of one label and one button. Button press starts the timer countdown. 1. Create NSTimer instance I use timer variable that holds reference to NSTimer object. Timer is then … Continue reading iOS: Timer countdown implementation tutorial (including source code)