How to transfer parameters between applications by calling each other

Suppose application A calls application B:

  1. Is this how it is written in A? :
    var request = webOS.service.request(‘luna://com.webos.applicationManager’, {
    method: ‘launch’,
    parameters: {
    id: ‘com.domain.app2’,
    params: {
    customParam1: ‘param1’,
    customParam2: ‘param2’,
    },
    },
    onSuccess: function (inResponse) {
    console.log(‘The app is launched’);
    // To-Do something

         },
         onFailure: function (inError) {
             console.log('Failed to launch the app');
             console.log('[' + inError.errorCode + ']: ' + inError.errorText);
             // To-Do something
             return;
         },
     });
    
  2. How to receive the parameters of A in B?

Please refer to the example code of the launch method in the webOSTV.js library. Thank you.