Visual Studio Android App

Visual Studio Android App Tutorial

Did you know you can create Android apps with HTML, CSS, and JavaScript? Yes, you can use the common web languages of today to create the Android apps of tomorrow: with Microsoft Visual Studio Community 2017.

Between 1997 and 2014, Visual Studio was not very affordable. It was intended for professional and enterprise customers, mostly. Then in late 2014, with the obvious dominance of the mobile space, Microsoft made the decision to release a Community edition of Visual Studio. It is geared towards individual developers and smaller teams. That is the edition you’ll want if you wish to create Android apps.

While it has never been easier to create apps, there are still a lot of initial steps. Visual Studio does a good job packaging all the separate tools into one bundle. Depending on your goals, however, those tools may vary from a 4Gb installation to a 24Gb one. With some guidance, you should be able to pick the best for your needs.

Download Visual Studio Community 2017

Head over to the Visual Studio home page for the free download. Be sure to select the Community 2017 edition, and not the Professional or Enterprise editions, or you’re in for some sticker shock! There is also a MacOS version, however, as of this writing, it’s significantly different than the Windows version: It relies on C++ to create Android Apps, instead of HTML/CSS/JavaScript. Microsoft’s version control system, Team Services, is also available on the site, as well as the dedicated editor Visual Studio Code.

Choosing a Mobile Apps development Workload

For nearly twenty years, developers used Visual Studio for creating desktop apps. With that space eclipsed by mobile, developers now need to move onto Android, iOS, and Windows Mobile to stay relevant. With Visual Studio 2017, developers have a workload that covers the core web languages necessary for cross-platform development. It’s the Mobile development with JavaScript workload, with Apache Cordova.

Creating a JavaScript project

The heart of the Android app is HTML, CSS, and JavaScript code. Yes, deeper down, there is the native code of Java, but the user is shielded from it by Visual Studio. Therefore, if one is skilled enough in the common web languages of today, one should be able to create some impressive apps. After all, there are many websites that are nearly indistinguishable from “real apps.”

Deploying to a real Android Device

Visual Studio comes, built-in, with a variety of simulators and emulators for mobile devices. You will be able to use either Google Chrome add-ons or self-contained environments to test your projects. Nothing beats the real thing, however. So if you have an Android device set to developer mode, you can actually deploy your projects to a real device.

Activating native device features

What elevates a “simple web project” to a “real mobile app” is the use of Plugins. Cordova (the technology that operates behind the scenes of Visual Studio), allows a developer to access native device features such as Camera, Vibration, Contacts, and more. All you have to do is activate the feature via a Plugin, and then write JavaScript code. Visual Studio (via Cordova), “translates” it into the right language the device can understand.

The Apache Cordova documentation

Under the hood, Visual Studio uses Apache Cordova. It’s, basically, the magic that lets you elevate a web project to a mobile project. Like most things, it’s a complex thing to master, but an easy thing to learn about. Read the Cordova documentation to learn about all that you can do.

Next Steps

Congratulations on taking your first steps into the world of Android app development. Via Visual Studio you’ll actually be able to create Android, iOS, and Windows mobile apps, even Ubuntu and MacOS apps, too. There is a lot to learn before you take that plunge, however. So make sure you read the documenation.

Watch the video

Check out a short, hands-on, look at the whole process of this tutorial.

2 replies
  1. Emmanuel Gyekye
    Emmanuel Gyekye says:

    Hello Sir,
    I am a self taught programmer who has been following your videos on youtube. I have been following your tutorials to build my first app using apache cordova but i am unable to run the program on my device. I have already installed my samsung mobile drivers on my pc but its not appearing on my phone. Please with due respect help me out. Hope to hearing from you soon.
    Thank you.

Comments are closed.