• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Interacting with Other Apps

I am developing an app, which is soft dependent on what a user does in another app. E.g. my app may allocate a reward to to a user who shares our image on Instagram.

What can be the best way for my app to verify that the user has done this action. Let's say no API is available for me to verify existence of such a post on Instagram.

a) Does android allow one app to programmatically interact with another. To what extent this depends on what the other app allows, vs certain general features of the platform which are always true irrespective of other app's intention of preventing such interaction?

b) Secondly, if I go the brute force way (provided user permits), can I simulate user actions and launch the other app and interact with it on behalf of the user, much like using the Win32 API and simulating a mouse click or keyboard input?

c) Basically, I just want a screen shot of the user showing me the post has been shared. My simplest goal is to verify that the screenshot is indeed from the other app, and not a static image or a fake app looking like the original?

Any guidance or general advice would be greatly appreciated.

The proper way to do this is to leverage the available APIs. Otherwise you would need some sort of bi-directional trust between your app and the one you want to interact with; definitely doable if you're building both apps, but somewhat less so when you want to tap into an app you don't control.

There are always the hacks by exploiting various accessibility services to see what's being displayed in another app, but apps which abuse those capabilities tend to get banned pretty quickly. And you're definitely not going to be able to perform inputs for the user in another app without drawing Google's attention.

Honestly, just stick with verifying posts via the available APIs. Anything less is pretty shady and likely to upset both users and Google.
  • Like
Reactions: mikedt and ocnbrze
Upvote 0


We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.