i want to detect that some application has started in android, such as when you have started YouTube application
Did you think of using a service
that would be running all the time in background and would send a broadcast for the current running application.
Hope this thread solves your problem somehow.
Determining the current foreground application from a background task or service