NativeScript : Use platform specific native library without a multi-platform plugin?










0















We're trying to use ArcGIS's Android Runtime SDK in NativeScript (it has no nativescript plugin) but we have accessed that rewriting the whole library as a multi-platform plugin would take too much time.



My question is, how can we utilize the native library directly but only the android version of it?



This is the library: https://developers.arcgis.com/android/latest/api-reference/reference/packages.html



Also, is it possible to use it without a custom UI plugin? I don't understand how to add the mapView to the app .xml



For example, in their AndroidStudio tutorial they mention the following steps and I'm not sure how to translate them to NativeScript



enter image description here



Source : https://developers.arcgis.com/android/latest/guide/develop-your-first-map-app.htm










share|improve this question




























    0















    We're trying to use ArcGIS's Android Runtime SDK in NativeScript (it has no nativescript plugin) but we have accessed that rewriting the whole library as a multi-platform plugin would take too much time.



    My question is, how can we utilize the native library directly but only the android version of it?



    This is the library: https://developers.arcgis.com/android/latest/api-reference/reference/packages.html



    Also, is it possible to use it without a custom UI plugin? I don't understand how to add the mapView to the app .xml



    For example, in their AndroidStudio tutorial they mention the following steps and I'm not sure how to translate them to NativeScript



    enter image description here



    Source : https://developers.arcgis.com/android/latest/guide/develop-your-first-map-app.htm










    share|improve this question


























      0












      0








      0








      We're trying to use ArcGIS's Android Runtime SDK in NativeScript (it has no nativescript plugin) but we have accessed that rewriting the whole library as a multi-platform plugin would take too much time.



      My question is, how can we utilize the native library directly but only the android version of it?



      This is the library: https://developers.arcgis.com/android/latest/api-reference/reference/packages.html



      Also, is it possible to use it without a custom UI plugin? I don't understand how to add the mapView to the app .xml



      For example, in their AndroidStudio tutorial they mention the following steps and I'm not sure how to translate them to NativeScript



      enter image description here



      Source : https://developers.arcgis.com/android/latest/guide/develop-your-first-map-app.htm










      share|improve this question
















      We're trying to use ArcGIS's Android Runtime SDK in NativeScript (it has no nativescript plugin) but we have accessed that rewriting the whole library as a multi-platform plugin would take too much time.



      My question is, how can we utilize the native library directly but only the android version of it?



      This is the library: https://developers.arcgis.com/android/latest/api-reference/reference/packages.html



      Also, is it possible to use it without a custom UI plugin? I don't understand how to add the mapView to the app .xml



      For example, in their AndroidStudio tutorial they mention the following steps and I'm not sure how to translate them to NativeScript



      enter image description here



      Source : https://developers.arcgis.com/android/latest/guide/develop-your-first-map-app.htm







      android nativescript arcgis-runtime






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 13 '18 at 18:36







      Mojimi

















      asked Nov 13 '18 at 18:12









      MojimiMojimi

      335830




      335830






















          1 Answer
          1






          active

          oldest

          votes


















          2














          I'm not quite sure what you mean by re-writing the whole library, you never have to do that.



          Plugins are being written to wrap the native library with simple user friendly JS api / methods, it necessarily need not to be cross (or multi) platform either.



          You may even directly access any third party library within your project as soon you mark them as dependency in your app gradle file.



          Here is how you access native apis.



          For instance if you want to create an instance of LocatorTask, this should work once you add the library as dependency in your NativeScript project.



          const locatorTask = com.esri.arcgisruntime.tasks.geocode.LocatorTask("URI_HERE");
          locatorTask.loadAsync();





          share|improve this answer























          • Well not rewrite, but since ArcGIS has one separate SDK for each platform, I'd need a wrapper to have a common/multi-plataform library, right? Else I'd just have two separate app logic for each platform

            – Mojimi
            Nov 13 '18 at 18:30






          • 1





            Yes, that's obvious. The code sharing part is only applicable to your business logic / core app & plugins. Platform specific features has to be that way.

            – Manoj
            Nov 13 '18 at 18:34










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53287151%2fnativescript-use-platform-specific-native-library-without-a-multi-platform-plu%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          I'm not quite sure what you mean by re-writing the whole library, you never have to do that.



          Plugins are being written to wrap the native library with simple user friendly JS api / methods, it necessarily need not to be cross (or multi) platform either.



          You may even directly access any third party library within your project as soon you mark them as dependency in your app gradle file.



          Here is how you access native apis.



          For instance if you want to create an instance of LocatorTask, this should work once you add the library as dependency in your NativeScript project.



          const locatorTask = com.esri.arcgisruntime.tasks.geocode.LocatorTask("URI_HERE");
          locatorTask.loadAsync();





          share|improve this answer























          • Well not rewrite, but since ArcGIS has one separate SDK for each platform, I'd need a wrapper to have a common/multi-plataform library, right? Else I'd just have two separate app logic for each platform

            – Mojimi
            Nov 13 '18 at 18:30






          • 1





            Yes, that's obvious. The code sharing part is only applicable to your business logic / core app & plugins. Platform specific features has to be that way.

            – Manoj
            Nov 13 '18 at 18:34















          2














          I'm not quite sure what you mean by re-writing the whole library, you never have to do that.



          Plugins are being written to wrap the native library with simple user friendly JS api / methods, it necessarily need not to be cross (or multi) platform either.



          You may even directly access any third party library within your project as soon you mark them as dependency in your app gradle file.



          Here is how you access native apis.



          For instance if you want to create an instance of LocatorTask, this should work once you add the library as dependency in your NativeScript project.



          const locatorTask = com.esri.arcgisruntime.tasks.geocode.LocatorTask("URI_HERE");
          locatorTask.loadAsync();





          share|improve this answer























          • Well not rewrite, but since ArcGIS has one separate SDK for each platform, I'd need a wrapper to have a common/multi-plataform library, right? Else I'd just have two separate app logic for each platform

            – Mojimi
            Nov 13 '18 at 18:30






          • 1





            Yes, that's obvious. The code sharing part is only applicable to your business logic / core app & plugins. Platform specific features has to be that way.

            – Manoj
            Nov 13 '18 at 18:34













          2












          2








          2







          I'm not quite sure what you mean by re-writing the whole library, you never have to do that.



          Plugins are being written to wrap the native library with simple user friendly JS api / methods, it necessarily need not to be cross (or multi) platform either.



          You may even directly access any third party library within your project as soon you mark them as dependency in your app gradle file.



          Here is how you access native apis.



          For instance if you want to create an instance of LocatorTask, this should work once you add the library as dependency in your NativeScript project.



          const locatorTask = com.esri.arcgisruntime.tasks.geocode.LocatorTask("URI_HERE");
          locatorTask.loadAsync();





          share|improve this answer













          I'm not quite sure what you mean by re-writing the whole library, you never have to do that.



          Plugins are being written to wrap the native library with simple user friendly JS api / methods, it necessarily need not to be cross (or multi) platform either.



          You may even directly access any third party library within your project as soon you mark them as dependency in your app gradle file.



          Here is how you access native apis.



          For instance if you want to create an instance of LocatorTask, this should work once you add the library as dependency in your NativeScript project.



          const locatorTask = com.esri.arcgisruntime.tasks.geocode.LocatorTask("URI_HERE");
          locatorTask.loadAsync();






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 13 '18 at 18:26









          ManojManoj

          5,2202921




          5,2202921












          • Well not rewrite, but since ArcGIS has one separate SDK for each platform, I'd need a wrapper to have a common/multi-plataform library, right? Else I'd just have two separate app logic for each platform

            – Mojimi
            Nov 13 '18 at 18:30






          • 1





            Yes, that's obvious. The code sharing part is only applicable to your business logic / core app & plugins. Platform specific features has to be that way.

            – Manoj
            Nov 13 '18 at 18:34

















          • Well not rewrite, but since ArcGIS has one separate SDK for each platform, I'd need a wrapper to have a common/multi-plataform library, right? Else I'd just have two separate app logic for each platform

            – Mojimi
            Nov 13 '18 at 18:30






          • 1





            Yes, that's obvious. The code sharing part is only applicable to your business logic / core app & plugins. Platform specific features has to be that way.

            – Manoj
            Nov 13 '18 at 18:34
















          Well not rewrite, but since ArcGIS has one separate SDK for each platform, I'd need a wrapper to have a common/multi-plataform library, right? Else I'd just have two separate app logic for each platform

          – Mojimi
          Nov 13 '18 at 18:30





          Well not rewrite, but since ArcGIS has one separate SDK for each platform, I'd need a wrapper to have a common/multi-plataform library, right? Else I'd just have two separate app logic for each platform

          – Mojimi
          Nov 13 '18 at 18:30




          1




          1





          Yes, that's obvious. The code sharing part is only applicable to your business logic / core app & plugins. Platform specific features has to be that way.

          – Manoj
          Nov 13 '18 at 18:34





          Yes, that's obvious. The code sharing part is only applicable to your business logic / core app & plugins. Platform specific features has to be that way.

          – Manoj
          Nov 13 '18 at 18:34

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53287151%2fnativescript-use-platform-specific-native-library-without-a-multi-platform-plu%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          這個網誌中的熱門文章

          How to read a connectionString WITH PROVIDER in .NET Core?

          Node.js Script on GitHub Pages or Amazon S3

          Museum of Modern and Contemporary Art of Trento and Rovereto