title: Get open activity of the foreground app
body: <p>I need to get the current Activity of the foreground App. I tried following <a href="https://stackoverflow.com/a/32109070/5974208">this answer</a> and later used <a href="https://github.com/ricvalerio/foregroundappchecker" rel="nofollow noreferrer">this library</a>(because the first solution only worked from Lollipop), and them indeed worked well telling the foreground app's package name, but I need to know what activity is open.</p>