0

I managed to find the way that my program would record a string using "Shared Preferences" and then I managed to find the way that my program runs in the background, so I would ask if there is a way to: pseudocode:

Activity see = (Activity) find ();
if (There's ==>  see.EditText)
{
    see.EditText.append("hello");
}

so my program when detects that there's an EditText in the application you are using(like messanger) write "hello" (precisely add Text ==> append)

There's a way to accomplish that?

NPLS
  • 521
  • 2
  • 8
  • 20

1 Answers1

0

It is—fortunately—not possible to access components inside other applications. The implications of this would defeat most of the safeguards put in place by the platform.

Depending on your intentions, you may want to instead focus on implementing an accessibility tool (where your app may receive an AccessibilityEvent concerning a control when it is focused) or your own keyboard.

Paul Lammertsma
  • 37,593
  • 16
  • 136
  • 187
  • there might be a way to interact with the program to send SMS original of android, I don't say I want to interact with any application but only with the app to send SMS, and only with permission of the user?? – NPLS Apr 14 '13 at 18:15
  • And then , the permission apper during the installation – NPLS Apr 14 '13 at 18:17
  • It is most certainly not possible to programmatically interact with the permissions dialog. What you're trying to accomplish is precisely why these security mechanisms have been put in place. – Paul Lammertsma Apr 14 '13 at 19:11
  • and if i only want to copy the text ??? with a command , I don't think is necessary permission for copying some text, or i'm wrong; – NPLS Apr 14 '13 at 19:32
  • are you sure that it is impossible – NPLS Apr 14 '13 at 19:32
  • it is like a program in which I insert a string and pressed a button it interacts with a browser and the text will search automatically, – NPLS Apr 14 '13 at 19:53
  • you do not need a permit !!, it's only a copy action – NPLS Apr 14 '13 at 19:54
  • http://stackoverflow.com/questions/16000240/how-could-i-send-datatext-to-other-appslike-messages – NPLS Apr 14 '13 at 19:56
  • I'm having difficulties understanding precisely what you want to do. Through an accessibility service you can obtain information about a selected control, so yes, you could theoretically copy that data. As for providing data *into* another application: that relies entirely upon which intent extras it expects. If you could provide a coherent user story, perhaps you'd get a more specific answer to your question. – Paul Lammertsma Apr 14 '13 at 21:13
  • Could you give me your email please? – NPLS Apr 15 '13 at 17:15
  • Please keep the discussion on this public forum so others can benefit from it as well. – Paul Lammertsma Apr 16 '13 at 10:38
  • How Could i obtain information Through an accessibility service ?? – NPLS Apr 16 '13 at 13:45
  • but here say me "avoid extended discussions in comments" – NPLS Apr 16 '13 at 14:27
  • There is [a developer guide for building an Accessibility Service](http://developer.android.com/guide/topics/ui/accessibility/services.html); I strongly recommend looking at it. If you have a *specific question*, please post a new one and feel free to link it here. You will no doubt get a better community response than doing a one-on-one with me here. – Paul Lammertsma Apr 16 '13 at 18:21