Android应用推出的背景 [英] Android app launch on background

查看:234
本文介绍了Android应用推出的背景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在开发的POS系统的Andr​​oid应用程序。我们的应用程序,用户转发到支付服务提供商(Adyen)的应用程序来处理付款:

We're developing an Android app for a POS system. Our app forwards the user to an app of a payment provider (Adyen) to handle the payment:

Intent intent = new Intent("com.adyen.posregister.payment");
// Here goes some irrelevant intent config
startActivityForResult(intent, 1);

不过,Adyen应用程序做的唯一事情是解雇了支付终端(通过蓝牙)。我们要保持我们自己的应用程序可见的所有的时间。

However, the only thing the Adyen app does is firing up the payment terminal (over bluetooth). We would like to keep our own app visible all the time.

问:是否有可能从我们的应用程序启动外部应用(在Adyen在这种情况下,应用程序)的,同时保持我们的应用程序在前景

Question: is it possible to launch an external app (the Adyen app in this case) from our app, while keeping our app on the foreground?

最好的问候,
威廉

Best regards, Willem

推荐答案

的常用方法问另一个应用,而不显示任何UI将是你执行任务:

The common methods to ask another app to perform a task for you without displaying any UI would be:


  • 启动服务

发送消息给广播接收器

如果您使用的是不需要UI它将使意义它支持一种或两种方法,但无论是否它实际上是供应商的问题的组件。

If the component you are using does not require UI it would make sense for it to support either or both methods, but whether or not it actually does is a question for the vendor.

在一般没有开始另一个活动,迫使它不显示UI并立即返回方法。无论出现这种情况要由其他活动。

In general there is no method to start another activity, forcing it to display no UI and return right away. Whether that happens is up to the other activity.

这篇关于Android应用推出的背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆