简体   繁体   English

当按下后退按钮时,可以跳过堆栈上的Chrome应用,以返回到我的应用

[英]To skip chrome app on the stack when the back button is pressed in order to go back to my app

A chrome app is launched by my app via an Intent.Action_View with an uri. 我的应用程序通过带有uri的Intent.Action_View启动了chrome应用程序。 The chrome app will in turn immediately launch an ebay app because the uri provided. 由于提供了uri,因此chrome应用程序将立即启动ebay应用程序。 So I like to make it so that when a user presses a back button, it will bring him back to my app instead of the chrome app. 因此,我喜欢这样做,以便当用户按下后退按钮时,它将把他带回到我的应用程序,而不是chrome应用程序。

So basically the stack is: my app -launched-> chrome app -launched-> ebay app. 因此,基本上,堆栈是:我的应用程序-启动-> chrome应用程序-启动-> ebay应用程序。

When the user presses the back button, is there a way to allow it to skip the chrome app. 当用户按下后退按钮时,有一种方法可以让其跳过chrome应用程序。

Or is there a way to force chrome app to close itself after it has launched the ebay app? 还是有一种方法可以在启动ebay应用程序后强制chrome应用程序自行关闭?

Thanks in advance for the help. 先谢谢您的帮助。

I am not sure that is possible. 我不确定这是可能的。 However, I would suggest you should use Chrome custom tabs or webview in your application instead of launching the chrome intent because user may or may not have chrome in his phone. 但是,我建议您应在应用程序中使用Chrome自定义标签或网络视图,而不要启动chrome意图,因为用户的手机可能带有或没有铬。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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