简体   繁体   中英

How do I open and use another android app through my own after a certain event?

I'm looking to do the following, but have no idea where to start, I have some basic android understanding and hope someone can point me in the right direction.

I have an app. That app waits for an SMS from a certain number. As I understand it's not so hard to accomplish using the content://sms/inbox content resolver. (this is as far I can manage on my own)

Upon receiving such an SMS I want to open another app (not mine) and press a certain button (or even navigate the UI until i get to it).

Is this possible to achieve? If yes, how?

I don't care how to, it can be a classy solution using libraries meant for it, or it could be brute force "record the touch input", but I really have no idea where to start in order to accomplish this.

The app you want to launch must have certain intents that you can invoke form you app when you recieve the SMS

Intent intent = getPackageManager().getLaunchIntentForPackage("com.thirdparty.package");
startActivity( intent );

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM