不同的Google Appmaker应用之间的集成 [英] Integration between different Google Appmaker Apps
问题描述
我希望能够使用和过渡动画在2个不同的应用程序(app1和app2)之间进行切换.理想地具有以下功能 1)App2能够识别由App1调用的 2)App1能够从App2接收回调参数
I'd like to be able to switch between 2 different apps (app1 and app2) using and transition animation. Ideally with the following capabilities 1) App2 is able to recognize that was invoked by App1 2) App1 able to received a callback parameter from App2
推荐答案
不幸的是,在这种情况下没有魔术.要实现此方案,您需要:
Unfortunately, no magic for this case. To implement this scenario you need to:
1在两个应用程序中创建单独的模型(例如AppSettings),并为每个应用程序分别在其中存储App1Url和App2Url.
1 Create separate model (AppSettings for example) in both apps and store there App1Url and App2Url correspondingly for each app.
2要将用户从App1导航到App2,您可以将此链接用于Link小部件:
2 To navigate user from App1 to App2 you can use this binding for Link widgets:
@datasources.AppSettings.item.App2Url + '?paramName=paramValue' + '#PageName'
3在"PageName"页面的onAttach事件中调用这样的函数
3 In the onAttach event of the 'PageName' page invoke function like this
function loadPageName() {
google.script.url.getLocation(function(location) {
var paramName = location.parameter.paramName;
var datasource = app.datasources.SomeDatasource;
datasource.filters.SomeField._equals = paramName;
datasource.load();
});
}
请记住,为避免重复加载数据源,您需要将其切换到手动加载模式.
Please, keep in mind, that to avoid double datasource loading you need to switch it to manual loading mode.
这种情况将导致整页重新加载.
This scenario will cause full page reload.
这篇关于不同的Google Appmaker应用之间的集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!