How it works...

You can now start to debug your application. Let's choose a different simulator in Visual Studio. Select Simulate in Browser - LG G5 and press F5

Chrome will launch and display your Cordova application:

Click on the Get Current Date button and the current date will be displayed above the button you just clicked on:

While your simulator is open, open the index.js file where you added the getCurrentDate() function and place a breakpoint on the line that reads $('#current-date').text("The date is: " + year + "/" + month + "/" + day);. Then click on the Get Current Date button again:

You will notice that your breakpoint is hit and you can now step through your code inspecting variables and debugging your application just like you are used to doing. You can even set conditional breakpoints. This is simply fantastic.

There is so much more to learn surrounding developing applications using Cordova. Web developers will find this process familiar and should easily pick it up. You can now take this application and run it on any platform because it is completely cross-platform. What you can try next is running your Cordova application using one of the Android Emulators available. Play around with this example and add some more functional code. Think of accessing a web service to retrieve values or play around with the styles.

Being able to target different mobile devices from a single solution using Visual Studio allows developers the freedom to experiment and find what solution fits them and their development style the best. Cordova steps up to the plate and offers developers a fantastic solution for those that do not use something such as Xamarin.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.181.57