Let's say there is a pre-existing Android app on my phone that has a button on its home screen that I can click. I know there is a way to launch that app from an app I am creating, but is there a way to click the button as well automatically? Is there a parameter I can pass in, and how would I go about using it?
1
- 2No. You can pass "parameters" to another activity (or application), but as long a the receiving activity is not coded to respond to that parameter with a button click (and a pre-existing app would normally not be coded that way), there is no way to make it do that.kalabalik– kalabalik2017-11-17 10:51:41 +00:00Commented Nov 17, 2017 at 10:51
Add a comment |
2 Answers
You can't have your apps push a button on another app. That would be a giantic security leak.
However, the other app might have options on how to call it. It will depend on that other app. You would call the other app with an Intent, then use putExtra to provide extra parameters.
2 Comments
Ergash Masharipov
come on, how this app was built then? I researched a lot but no luck(
malhobayyeb
@ErgashMasharipov Any luck finding how auto clicker apps work?
MacroDroid does this just fine. Have to give it higher permissions and capability to run in background and never allow to sleep. Been running my security cameras macro for 2 years now with no issues.
1 Comment
Community
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.