0

I have a program that can send input to a running application. But if sometimes any erroneous input is given the program exits or loses focus. I just want to know if I can detect the current activity that is on focus and compare it with my programs activity to learn whether the desired program lost focus or not. The program i am testing is a third party application. So i cannot write the program myself. All i need to know is to learn the current running activity with focus. The tool I am using to send commands is written in ruby and java. Do you have any java program to query about this?

Thanks.

P basak
  • 4,874
  • 11
  • 40
  • 63
  • Check this, it it helps you in any way http://stackoverflow.com/questions/2314969/how-to-determine-if-one-of-my-activities-is-in-the-foreground – techieWings Aug 28 '13 at 05:29
  • I have seen that lik before. But as i said the application I am quering is not my own. i cannot put my own code in onResume or onPause. – P basak Aug 28 '13 at 05:34

0 Answers0