1. Are you ready for the Galaxy S20? Here is everything we know so far!

Interacting with Other Apps

Discussion in 'Android Development' started by Asif Shiraz, Jul 9, 2021.

  1. Asif Shiraz

    Asif Shiraz Lurker
    Thread Starter

    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.

    Thanks
    Asif
     



    1. Download the Forums for Android™ app!


      Download

       
  2. codesplice

    codesplice Elite Recognized Moderator
    Moderator

    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.
     
    mikedt and ocnbrze like this.
Loading...
Similar Threads - Interacting Apps
  1. App Update
    Replies:
    0
    Views:
    140
  2. App Update
    Replies:
    0
    Views:
    140
  3. App Update
    Replies:
    0
    Views:
    163
  4. sand1
    Replies:
    2
    Views:
    221
  5. Callandha
    Replies:
    0
    Views:
    594
  6. Samsung
    Replies:
    0
    Views:
    561
  7. DjinnLyn
    Replies:
    1
    Views:
    959
  8. DennyWeinberg
    Replies:
    4
    Views:
    1,101
  9. Excelling Apps
    Replies:
    0
    Views:
    451
  10. mikedt
    Replies:
    5
    Views:
    1,636

Share This Page

Loading...