External components in a mobile app

We’ve carried out a mechanism for the cellular platform for exterior parts. It permits you to create external components utilizing the Native API expertise, much like how it’s performed in a forum for private computer systems. There are some peculiarities related to cellular working programs. However, all the pieces may be very comparable.

When creating an exterior part, you should build its variants for all working programs you are interested in and for all processors of cellular units on which it’s alleged to work. All these choices should be compiled right into a ZIP archive and positioned in a configuration format of the Exterior part sort (the one method to add a part to the configuration). We’ve added a new kind of format to the platform.

After that, within the cellular software, you join it in the identical method as in an everyday platform. For instance, like this:

When the configuration is written, the Configurator menu gadgets Configuration – Cellular software – Write to file, unload the 1cem.zip file for the cellular software builder.

Within the cellular app builder, we added the corresponding potential to obtain the next archives:

For debugging functions, you possibly can manually substitute records data within the unloaded archive by adjusting the habits of the collection purposes.

The bundler will mechanically embody the required libraries for goal purposes when constructing.

Exterior part archive

The ZIP archive of the exterior part should include a set of required recordsdata. The collector mechanically disables the era of ultimate purposes for working programs for which all the necessary recordsdata usually are not included within the supplied archive.

The ZIP archive might embody:

  • Part choices for Home windows (x86, ARM);
  • Part choices for Android (x86, ARM);
    • Moreover, you possibly can represent a * .apk file for Java code;
  • Part variants for iOS (ARM and ARM64 mixed right into a single standard file);
    • Importantly, iOS requires each a dynamic (* .dylib) and a static * .a library;
  • MANIFEST.XML file describing the contents of the archive;
  • Optionally, you possibly can embody the ANDROID_MANIFEST_EXTENTIONS.XML file to explain the modifications to AndroidManifest.xml, if wanted.
  • Additionally, if essential, you possibly can embody the WINDOWS_RT_MANIFEST_EXTENTIONS.XML file and the WINDOWS_RT_PHONE_MANIFEST_EXTENTIONS.XML file to make modifications to AppxManifest.xml.

Options for various working programs

The specificity of iOS app growth doesn’t permit non-system DLLs to publish to the AppStore. Subsequently, when creating an exterior part for iOS, it’s essential to have a * .dylib dynamic library file for testing and debugging functions. And apart from that, you want a binary * .a file for static linking, which the cellular software builder will probably perform.

The exterior part code should be a unique namespace to avoid title conflicts. The namespace title should match the title of the outer part or embody it as a part of it. Part registration is finished statically when the appliance is loaded.

To develop an exterior part variant for Home windows Runtime, you want at the very least Home windows 8.1 with MS Visible Studio 2013 SP4 (Home windows Cellphone SDK). The growth results need to be a gaggle of dynamic libraries (* .dll) for cellular units and tablets of all supported processors.

When creating a model of an exterior part for Android, you can write code within the c ++ programming language and use the Java Native Interface applied sciences. Growth should lead to a gaggle of dynamic hyperlink libraries (* .so) for all supported processors. And if you’re utilizing Java code, then the * .apk file should be current.

When publishing software within the settings of the http server, you should add MIME varieties for the next extensions: .so, .apk, .dylib, .a. MIME sort: software / octet-stream.

Restrictions

The performance of exterior parts for cellular purposes has quite a lot of limitations:

  • The consumer interface can’t be used;
  • It’s forbidden to name the next strategies from the system thread:
    • bool ADDIN_API Verify(const WCHAR_T* queryText, tVariant* retVal);
    • bool ADDIN_API Alert(const WCHAR_T* textual content);
    • The reason is that displaying modals on this case may cause the appliance to “cling”;
  • For Home windows Runtime, the flexibility to load dynamic libraries from HTTP server publishing shouldn’t be carried out.

Examples of

Within the documentation for creating exterior parts, we’ve added several supplies that can assist you to use this expertise for cellular purposes.

First, we added the front-end template for the cellular platform. It’s going to make it simpler so that you can create a part from scratch. And secondly, we added an instance of utilizing a ready-made exterior aspect developed using the Native API expertise within the configuration, with an outline of its properties, strategies and occasions.

Facebook
Twitter
Pinterest
WhatsApp

Related Articles

Latest Articles