Wednesday, April 5, 2017

Cordova Camera Plugin Version 2.4.0 throwing error when building for android. - ( Guid to remove and add plugins, Maintaining your cordova project )


Even if I put specifically android in this post title may be other platforms may have this issue. The solution was simple one but I learnt many good practises and tips when I was searching for the solution.

Good practises you should follow when you working on a Cordova project

1. Update java SDK when you have a major update in java.
2. Update android SDK after every month.
3. Use updated version of Node JS.
4. Check and update your cordova version and plugin versions. ( If you using .NET and cant remove excising plugins  please follow safe plugin removal steps in this guide )


Remove plugins safely in .NET cordova project 

Sometimes dot net does not allow you to remove some of cordova plugins. In this case try to remove plugin from config.xml using xml text editor. Make sure once you remove the plugin line you also need to remove the plugin folders . Please refer following screen shots.










Problem with new camera plugin version 2.4.0

To fix this simply you will need to update you cordova-plugin-compat to version 1.1.0 which has the old version number of 1.0.0 . 

cordova-plugin-camera and cordova-plugin-geolocation are depend on compat plugin. So you may need to remvoe those two plugins before you upgrade compat plugin.




Monday, April 3, 2017

Angularjs dropdown value is not updating

Ok here is my story. I have one dropdown which is populating value from a JSON object and and it will be a number. But when you taking data from server using $http in it's success function  my drop-down did not updated.  Simply it was blank..


var httpRequest = $http({
            method: 'POST',
            url: "URL",
            data: { Params }

        }).then(
        function successCallback(response) {

            $scope.ApiServiceObject.EntityTemplateId = response.data.d.dropdownvalue;
       

        },
        function errorCallback(response) {

        });


But when I'm trying to set value to my drop-down from a integer property its not working.   So I changed bellow line and everything working fine now. 


 $scope.ApiServiceObject.EntityTemplateId = response.data.d.dropdownvalue.toString()

Thursday, March 30, 2017

Generate method stub missing visual studio 2015

In visual studio 2015 micrsoft has added few extra steps, so you can validate and edit the method or whatever code part you going to add. Please follow the following steps.

1. Right-click on the method or property name you want to add.




2. Click on Quick Actions and Refactorings.



 
3.  Edit the method or property if you need and click apply.



Wednesday, March 22, 2017

Internet explorer virtual machines by Microsoft.


For developers Microsoft has provided virtual machines with various ie versions.

https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/




Vertual Box windows vertual machines causes windows 10 blue screens



Recently I needed to test IE 9 bug in my workplace. When I tried to launch the virtual machine provided by Microsoft ( Please go to this post to get more details about microsoft internet explorer virtual machines )  but my windows 10 crashed and went to blue screen window.

After few hours of research and googling I found the problem. Its the hyper-v, the very technology that Microsoft introduce to create better virtual  machines.

So I disabled hyper-v and seems to be all good.


Disabling hyper-v


 Method 1 - Turn windows feature off in programs and features.
 Method 2 - Powershell commands


dism.exe /Online /Disable-Feature:Microsoft-Hyper-V-All

http://www.poweronplatforms.com/enable-disable-hyper-v-windows-10-8/

Operating system not found windows 10


I had this issue with my old laptop often, There are few reasons with your windows 10 OS which can cause this error message when you starting your computer.


1. You have connected USB storage to one of your USB ports. Its always a best practise remove any USB storage devices attached to your computer before turning on 

2. Disk connectivity issues.

3. Corrupted files  in OS.



Monday, March 6, 2017

Javascript and CSS caching in cordova application.



When you developing apps with cordova ( Phonegap ) you must have noticed some css and script changes is not applying to your app sometimes. You should try following things.


1. Clean your project and run again.
2. Uninstall the app in device of emulator.
3. If none of the above did not worked then delete the content inside platform folder.