android: play media in app

During my research in the possibilities of playing audio and video from app, I found several ways of playing media. The simplest one is to use external player. It was described in the post “Android: how to play audio and video from app“. Here are some examples how to play media in app.