如何打开安卓后者的边界内的其他应用程序中的应用程序? [英] How to open an application inside another application within the latters boundaries in android?

查看:338
本文介绍了如何打开安卓后者的边界内的其他应用程序中的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何打开安卓后者的边界内的其他应用程序中的应用程序?即,类似于IFRAME确实在HTML中。

How to open an application inside another application within the latters boundaries in android? ie., similar to what iframe does in HTML.

推荐答案

这是因为安全原因不可能的。 Android系统previous版本允许这与系统级权限(那些大部分开发商将永远不会使用),但它很少使用,而不是在SDK中了,因为据我所知。

This is not possible because of security reasons. Previous versions of Android allowed this with System-grade permissions (ones that most developers will never get to use), but it was rarely used and is not in the SDK anymore as far as I know.

有些制造商实施类似三星的Mini Apps的附加功能(如果我没有记错的名字),它可以在上述其他应用程序的浮动窗口打开。你也可以自己绘制的应用程序在另一个使用服务(如Facebook信使一样)。但是没有办法强迫第三方应用程序做任何这些东西。

Some manufacturers implement additional functionalities like Samsung's Mini Apps (if I remember the name correctly) which may be opened in a floating window above other apps. You can also draw your own app over another using a service (like Facebook messenger does). But there is no way to force a third party app to do any of these things.

但是,每次你从你的应用程序中打开的应用程序时,新的过程中会有调用者的过程中指定为父母。这使您,在某种程度上,检查此其他应用程序是从您的应用程序打开。

However, every time you open an application from your application, the process of the new one will have the invoker's process assigned as parent. This allows you, to some extend, check if this other app was opened from your app.

此外,您的应用程序不会打开一个新的时候死了,但仅仅是下方。如果你需要一些类型的数据与其他应用程序,你可以启动它 forResult 。这样,其他应用程序将知道你是从它期待一个确定的结果,所以它会处理一些数据,并将其传递回您的应用程序(另一种是完成preparing结果之后,将再次出现)。

Also, your app will not die when opening a new one, but will simply be "below it". If you need some kind of data from the other app, you may start it forResult. This way the other app will "know" you are expecting a defined result from it, so it will process some data and pass it back to your app (which will reappear after the other one is finished preparing the result).

这篇关于如何打开安卓后者的边界内的其他应用程序中的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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