Develop Mobile App Using Visual Studio 2015 (Apache Cordova)
Learn the steps for creating a basic Android mobile application in Visual Studio/Cordova with HTML code in this tutorial.
Join the DZone community and get the full member experience.
Join For FreeHi, friends. Today, we are going to learn how to develop mobile apps using Visual Studio (Apache Cordova)
Install Visual Studio 2015 on your local machine.
Create a new project in your workspace.
Select a blank app and save it in your machine workspace. Then, once it is saved, you will see the following screen:
Click www, then index.html, where you can design your mobile application with HTML code.
Then, run the application. You will see the following screen:
That’s all - here is your mobile application. You can make it more attractive by adding CSS style to your solutions. Now for how to deploy it on your machine.
Installing the Mobile App on Your Android Device
Go to the solution release mode and select the Android option.
Now, build the solution. Once it builds, successfully, go to the solution folder - bin, Android, then Release. Here you can see the unsigned APK file.
Now, our next step is to change that APK file from unsigned to signed. For this, we have to run some command in CD.
Open Run, cmd, then run as admin.
Go to this directory:
Just type keytool
to view all the commands.
Then run the following syntax to generate a key:
keytool -genkey -v -keystore <keystoreName>.keystore -alias <Keystore AliasName> -keyalg <Key algorithm> -keysize <Key size> -validity <Key Validity in Days>
Then it will ask you to fill in details. After finishing all the details, the automatically.KEY file generates an unspecified path.
Now go to the build.json file in your solution and key in all the valid key details and save, then Build. In bin/android/release/ you can see the .apk file signed. Copy it to your mobile and install it.
Try this method to improve your skills in developing Apache Cordova mobile apps using Visual Studio 2015.
Published at DZone with permission of Rathrola Prem Kumar. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments