none
Cross Platform Mobile Development - Sharing Code Between Platforms

    Question

  • So I'm planning on making an app for Windows (UWP) and Android, and I've been searching around for different resources on the best ways of doing it in VS2015.

    So far it seems you create a solution with a project for the Windows specific code, a project for the Android specific code and a project for the cross platform code. The only problem is that they seem to be using a template called "Dynamic Shared Library (Cross Platform)" but I can't seem to find that template anymore, the closest I get is "Dynamic Shared Library (Android).

    What's the best way of going about writing as much of my code cross platform as possible?

    Sunday, December 13, 2015 4:41 PM

Answers

  • Hi Belbertn,

    From the screenshot you offered. I am not able to find the "V++ for Cross Platform Mobile Development"

    Since you were using VS2015 Community. I suggest you to use VS2015 Professional instead it.

    I think the VS2015 Community dose not support it, you could refer to the link below to see the support function for VS2015 Community and Professional.

    https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx

    Best Regards,

    Lake Xiao


    Monday, December 21, 2015 2:23 AM
    Moderator

All replies

  • Hi Belbertn,

    Thanks for your post.

    >>they seem to be using a template called "Dynamic Shared Library (Cross Platform)" but I can't seem to find that template anymore

    You need to choose the installation option ('Visual C++ for cross-platform mobile development') ,then you will find the Dynamic Shared Library (Cross Platform) template.

    Also you could refer to the link below for detailed information:

    http://blogs.msdn.com/b/vcblog/archive/2015/11/12/cross-platform-mobile-development-with-visual-c.aspx

    >>What's the best way of going about writing as much of my code cross platform as possible?

    You could use Visual C++ Cross-Platform mobile development.

    C++ is unique as it provides the ability to write efficient, fast and feature rich cross-platform mobile code once which can then be shared across these different device platforms.


     

    Best Regards,

    Lake Xiao



    Tuesday, December 15, 2015 5:21 AM
    Moderator
  • I do have VS++ for Mobile Development installed (Sorry, should have mentioned that) but that template is nowhere to be found. I've tried on two computers with W10.

    But I found something called a "Shared Items Project" and when I set up a solution with a Native Activity Android App, a Windows Universal project and a Shared Items Project I get what seems to be pretty much the same setup. Do you know if it is?

    Thanks for the reply :)

    Thursday, December 17, 2015 10:47 PM
  • Hi Belbertn,

    Thanks for your quick response.

    >>but that template is nowhere to be found

     I suppose you may miss some steps.

    Once this primary installation is complete, cross-platform mobile development users are provided with an additional install of third party software as part of the secondary installer. (Choose 'Restart and Install' option).

    Once the secondary installer comes up after a system restart, make sure the following entities are all (Android SDK, Android NDK, Apache Ant, Oracle Java SDK and Microsoft Visual Studio Emulator for Android) selected as shown in following screenshot and follow through the rest of the installation process.  

    Hope that could be helpful to you.

    Best Regards,

    Lake Xiao

    Friday, December 18, 2015 2:04 AM
    Moderator
  • Hi Lake Xiao,

    I ticked of the correct box as shown in your first picture but instead of the secondary installer I get a dropdown menu.

    I had to take two screenshots to get all of it:


    • Edited by Belbertn Friday, December 18, 2015 3:32 AM Change a sentence for clarity
    Friday, December 18, 2015 3:32 AM
  • Hi Belbertn,

    From the screenshot you offered. I am not able to find the "V++ for Cross Platform Mobile Development"

    Since you were using VS2015 Community. I suggest you to use VS2015 Professional instead it.

    I think the VS2015 Community dose not support it, you could refer to the link below to see the support function for VS2015 Community and Professional.

    https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx

    Best Regards,

    Lake Xiao


    Monday, December 21, 2015 2:23 AM
    Moderator