Starting new Activity from AsynkTask

  • Replies:0
Paper Image Detector
  • Forum posts: 1

Jul 17, 2017, 11:28:02 AM via Website

Hi,

I have developed an app called Paper Image Detector, currently on Google Play, that searches for images that might be paper and then lets you delete them.

When the AsynkTask in charge of detecting which images are paper has finished its job, it starts a Gallery Activity displaying the pictures.

However, the AsynkTask also runs when the app is in the background. I have found that when the user starts the search and leaves the app to do something else, when the search ends the Gallery Activity is brought to the forefront no matter what.

I would like to start the Gallery Activity ONLY when the user is currently using my app.

Is there any way of solving this problem?

Thanks

Reply