[英]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. 我正在寻找执行以下操作的方法,但是不知道从哪里开始,我对android有一些基本的了解,希望有人可以向我指出正确的方向。
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. 据我了解,使用content://sms/inbox
内容解析器并不难。 (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). 收到这样的短信后,我想打开另一个应用程序(不是我的)并按下某个按钮(甚至导航UI直到找到它)。
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 您要启动的应用程序必须具有某些意图,您可以在收到SMS时从应用程序中调用
Intent intent = getPackageManager().getLaunchIntentForPackage("com.thirdparty.package");
startActivity( intent );
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.