简体   繁体   English

在发生某个事件后,如何通过自己打开并使用另一个Android应用程序?

[英]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.

相关问题 android:如何从我的应用程序打开另一个应用程序? - android: how do i open another app from my app? 如何在Android上将自己的方法与HttpURLConnection对象一起使用? - How do I use my own method with an HttpURLConnection object on Android? 如何在WebView应用程序中打开另一个应用程序? - How do I open another app in my WebView app? 如何在Android XML中使用自己的颜色 - How do I use my own colors in android XML 如何通过共享屏幕打开我的 Android 应用程序? - How can I open my Android app through share screen? 我如何从Android中自己的应用程序打开Splashtop应用程序 - How i can open a splashtop app from my own app in android Android:如何在我自己的应用程序中启动某个应用程序的快捷方式? - Android: How can I launch shortcut of a certain app in my own application? Android - 如何通过Intent在另一个应用程序中打开文件? - Android - How do I open a file in another app via Intent? Android Studios:如何编写代码,让我的应用程序在多次点击后执行特定操作? - Android Studios: How do I make a code that allows my app to do a certain action after a written number of clicks? Android Intent-如何从选择列表中打开我自己的应用并获取我输入的消息 - Android intent - how to open my own app from choosing list and get the message I entered
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM