Support add-in in mobile

45 Views Asked by At

We are working on creating of Add-in for the Outlook. And there is a requirement to make it work in mobile. Read some articles https://learn.microsoft.com/en-us/javascript/api/manifest/mobileformfactor?view=common-js-preview and https://learn.microsoft.com/en-us/answers/questions/1275940/how-to-fix-the-mobileformfactor-outlook-add-in-man , but they didn't help. We got the error during add-in installation

enter image description here

It seems the MobileFormFactor section is not correct but don't see a way of fix

<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
           xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0"
           xsi:type="MailApp">
  <Id>1f6f9121-f8e2-4467-b59b-75191504bfa9</Id>
  <Version>1.0.0.0</Version>
  <ProviderName>Formpipe A/S</ProviderName>
  <DefaultLocale>da-DK</DefaultLocale>
  <DisplayName DefaultValue="Adoxa Outlook Scanner"/>
  <Description DefaultValue="This add-in adds Adoxa scans support for Outlook."/>

  <IconUrl DefaultValue="https://localhost:3000/assets/icon-64.png"/>
  <HighResolutionIconUrl DefaultValue="https://localhost:3000/assets/icon-128.png"/>

  <SupportUrl DefaultValue="https://localhost:3000/help"/>

  <AppDomains>
    <!-- All domains you want to access must be listed here (origin) -->
    <AppDomain>https://localhost:3000/</AppDomain>
    <AppDomain>https://localhost:5001/</AppDomain>

    <!-- DEV environment-->
    <AppDomain>https://devportal.adoxabyformpipe.com/adoxa-api/</AppDomain>
  </AppDomains>

  <Hosts>
    <Host Name="Mailbox"/>
  </Hosts>

  <Requirements>
    <Sets>
      <Set Name="Mailbox" MinVersion="1.1"/>
    </Sets>
  </Requirements>

   <!-- Old schema. This will be overridden by the VersionOverrides below. -->
  <FormSettings>
    <Form xsi:type="ItemEdit">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://localhost:3000/commands.html"/>
      </DesktopSettings>
    </Form>
  </FormSettings>
  <!-- /Old schema. -->

  <Permissions>ReadWriteMailbox</Permissions>

  <Rule xsi:type="RuleCollection" Mode="Or">
    <Rule xsi:type="ItemIs" ItemType="Message" FormType="Edit" />
  </Rule>

  <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
    <!-- On Send requires VersionOverridesV1_1 -->
    <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
      <Description resid="residAppDescription" />
      <Requirements>
        <bt:Sets DefaultMinVersion="1.3">
          <bt:Set Name="Mailbox" />
        </bt:Sets>
      </Requirements>

      <Hosts>
        <Host xsi:type="MailHost">
          <!-- Event-based activation happens in a lightweight runtime.-->
          <Runtimes>
            <!-- HTML file including reference to or inline JavaScript event handlers.
                 This is used by Outlook on the web and Outlook on the new Mac UI. -->
            <Runtime resid="WebViewRuntime.Url">
              <!-- JavaScript file containing event handlers. This is used by Outlook on Windows. -->
              <Override type="javascript" resid="JSRuntime.Url"/>
            </Runtime>
          </Runtimes>

          <MobileFormFactor>
            <FunctionFile resid="residUILessFunctionFileUrl" />
            <ExtensionPoint xsi:type="MobileMessageReadCommandSurface">
              <!-- information on this extension point -->
              <LaunchEvent Type="OnMessageCompose" FunctionName="onMessageComposeHandler"/>
            </ExtensionPoint>
            <!-- possibly more ExtensionPoint elements -->
          </MobileFormFactor>

          <DesktopFormFactor>
            <FunctionFile resid="WebViewRuntime.Url" />
            <ExtensionPoint xsi:type="Events">
              <Event Type="ItemSend" FunctionExecution="synchronous" FunctionName="onMessageSendHandler" />
            </ExtensionPoint>

            <ExtensionPoint xsi:type="LaunchEvent">
              <LaunchEvents>
                <LaunchEvent Type="OnMessageCompose" FunctionName="onMessageComposeHandler"/>
                <LaunchEvent Type="OnMessageAttachmentsChanged" FunctionName="onMessageAttachmentsChangedHandler"/>
              </LaunchEvents>
              <SourceLocation resid="WebViewRuntime.Url"/>
            </ExtensionPoint>

          </DesktopFormFactor>
        </Host>
      </Hosts>
      <Resources>
        <bt:Urls>
          <!-- The JavaScript code is hosted on a secure and trusted web server. -->
          <bt:Url id="WebViewRuntime.Url" DefaultValue="https://localhost:3000/commands.html"/>
          <bt:Url id="JSRuntime.Url" DefaultValue="https://localhost:3000/commands.js" />
        </bt:Urls>
      </Resources>
    </VersionOverrides>
  </VersionOverrides>

</OfficeApp>

0

There are 0 best solutions below