android - message callback

Rudolf Meier 291 Reputation points
2022-10-31T13:32:40.21+00:00

I'm new to Android development, but I know a lot about Windows. In Windows we have GetMessage/PeekMessage and in Android we also have "messages" and... the "everything is a file"-idea and you have to register for messages/events using something like the ALooper_addFd. And here's my question... what's the idea behind the "callback" parameter? Why should I use it? And when should I not use it (set to NULL) ?? What's the advantage/disadvantage of those mechanisms? Or is there a reason why only one can be used for specific cases?

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,591 questions
{count} votes