In this code snippet, what Activity class do I use? The one where the code is written? Is this statusbar message going somewhere?
Intent notificationIntent = new Intent(this, MyActivity.class);
Does this method act immediately or it's done later?
NotificationManager.notify();
In this code snippet, what Activity class do I use?
How should we know? We are not mind readers, and you have given us one line out of a much larger example somewhere.
Taking a completely random guess, that is probably the activity that should be opened when the user taps on the notification entry.
Does this method act immediately or it's done later?
The call is asynchronous, but it should be displayed almost immediately.