Today I want to talk about Context in Android. As you know, whether we’re attaching a view or get an asset, – almost always there is a reference to Context. From the documentation, Context is an interface to global information about an application environment. This is an abstract class whose implementation is provided by the Android system. It allows access to application-specific resources and classes, as well as up-calls for application-level operations such as launching activities, broadcasting and receiving intents, etc.
On the one hand, we all know it and use it, on the other – we often use it in a wrong way or just don’t care enough whether garbage collector will clean it or will the context be hanging there somewhere or, even worse, cause a memory leakage. So, what are the ways of getting a context? A couple actually:
- this / getActivity()
Continue reading What is it about Context in Android?
Autumn is over and so it’s time to sum up all of the great things it brought. Both in Poland and Ukraine we had big mobile events – GDG Dev Fest Poland 2016 and GDG Dev Fest Ukraine 2016. Unfortunately, I wasn’t present on either of them 🙁 If you were like me, here’s the link to talks. Here, in Warsaw, we also had a few good Mobile Warsaw meetups, so as you can see, the opportunity to deepen the mobile knowledge was broad.
Not only this, – the amount of great albums, released in the last couple of months, is just incredible! If I had to pick my absolute favorite, it would be Empire of the Sun – Two Vines, but it doesn’t mean the others are bad!
In November I also became an addict to games and educational apps. Which ones? Check the items below! 😉
Continue reading #2016 Autumn Digest
It’s been a long time since I talked about my app’s release, but finally this day came! Today, I want to present you Look Counter – a simple app for counting how many times a day you have turned on and unlocked your phone (or tablet). It counts this in background and displays the latest numbers on the main view. You, as a user, can delete this data at any moment of time (Clear all Data option, with a quick Undo if you change your mind).
I’ve put an About view, if somebody is confused with the minimalist design and doesn’t follow what those numbers in circles mean, or maybe, wants to contact me right away, and say that counting doesn’t work for him at all! 😛
Anyway, the source code is on GitHub, so you can check what’s inside and grab tasty pieces, as well as point me at my mistakes 😉
Continue reading Look Counter app and more!
The summer is over (well, for some of us 🙂 and it’s time to sum up interesting stuff for the last three months. And quite a lot has happened! Android released it’s newest version – Nougat. It is focused on security, speed and nice new features, like split screen and direct notifications reply. Developers have their own new toys, like ConstraintLayout and Direct Boot. On other fronts, Apple helps us learn Swift with Swift Playgrounds, and we still have Olympic Games in Rio, as well as great music releases by ZHU, Tom Odell or Mumford & Sons. There were a few game releases, but the the major ones are ahead.
As you can see, the diversity is big, so it’s your choice where to invest the time!
As always, here’s the link to the previous Digest 😉 Thanks for reading!
P. S. Yep, my monthly, then two-month digests have been converted to seasonal ones. This is because I find it extremely difficult to sort all and do it on time. Hopefully, this new format will keep me organized 🙂
Continue reading #2016 Summer Digest