Integration between different Google Appmaker Apps

时光总嘲笑我的痴心妄想 提交于 2019-12-18 05:25:08

问题


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


回答1:


Unfortunately, no magic for this case. To implement this scenario you need to:

1 Create separate model (AppSettings for example) in both apps and store there App1Url and App2Url correspondingly for each app.

2 To navigate user from App1 to App2 you can use this binding for Link widgets:

@datasources.AppSettings.item.App2Url + '?paramName=paramValue' + '#PageName'

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.



来源:https://stackoverflow.com/questions/41904477/integration-between-different-google-appmaker-apps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!