Posts

How to build a maven project without tests

When we build a large project using maven it takes a lot of time because of tests  runs. So we can build quickly by disabling the tests. We can do that using the following command. mvn - Dmaven . test . skip = true install

Using Geolocation API in phone gap

I am currently developing a Phonegap application for Google summer of Code 2012. I encountered some problems when using it and this is how I corrected them. Location not available- In android emulator does not automatically get the location. So we have to send a moc location to the emulator using DDMS perspective in eclipse. Phonegap documentation says to use the below method to get location. navigator.geolocation.getCurrentPosition(onGeoSuccess,onGeoError); But this gave me an error with error code 2 unable to start geolocation service. I corrected it using the below method. navigator.geolocation.getCurrentPosition(onGeoSuccess,onGeoError,{ enableHighAccuracy: true }); Note - This is only for testing in the emulator.

How to make a phone call in a Android application

This may a looks like a simple task. Actually it is a simple task. You can do it using few lines of code. But there are only few places which shows how to do it. So I decided to mention it here. public void onCallButtonClicked(View view) { String url = "tel:" + tpNo; Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse(url)); intent.setData(Uri.parse(url)); startActivity(intent); }

Android: Using Google maps app to show places in your application

Image
When we are developing android application with maps functionality normally developers tries to use Google maps API for this. But if your requirement is simple it may be more easy and effective to use existing maps application by a intent. In this application I'm going to show how to show the nearest hospital in your application. Note- To make this work your app and emulator must be created using Google APIs not android APIs. (Both are the same but if you are not using Google maps API map application functionality is not available to you). Here is the code, LocationManager  locMgr  = (LocationManager) getSystemService(Context. LOCATION_SERVICE); Location recentLoc = locMgr.getLastKnownLocation( LocationManager.GPS_PROVIDER); double lat = recentLoc.getLatitude(); double lon = recentLoc.getLongitude(); String geoURI = String.format("geo:%f,%f?q= hospital", lat, lon); Uri geo = Uri.parse(geoURI); Intent geoMap = new Inten...

Free alternatives for paid(propitiatory) software

Today software piracy has become a major topic in software industry. If we look for a propitiatory software we can find many cracked copies of the latest versions of propitiatory software from the internet. But if we use those things ultimately we steel someones hard work. Also by installing cracks, keygen,etc we are exposed to various security threats. Also it is against the law. Then what is the solution. today we have free alternatives for most of these paid software. Some of them are open source others closed source but free. If we use Linux based operating systems like Ubuntu , Fedora , Etc. almost all the software are free. But still the majority of PC users use Windows. So I'm going to discuss about some of the free software which can be used on Windows. 1.Antivirus Software Avast free antivirus ,  AVG free Anitvirus , Zonealarm Etc. 2.Media Players You can play any video...

Windows Mobile Mango. (Will it be delicious???)

Image
Surely Microsoft rules the PC operating system market. There market share is more that 70%. But what about mobile operating systems? Surely Microsoft had to work hard because there are many competitors like Android, Apple iOS, Blackberry, etc and their market share is way over than Microsoft's mobile platform Windows Phone. Their previous mobile platform Windows Phone 7 did not do notable difference in smart phone market. But now they have come up with a bang with their latest version Windows Phone 7.5 Mango. Mango, officially Windows Phone 7.5, adds some 500 improvements to the Windows Phone 7 platform, according to the company. Windows introduced their revolutionary tile interface with Windows mobile 7 platform. Now they have gone a further step. They have made the Tiles extra dynamic which is called Live Tiles. As an example a live eBay tile can display how long there is left on an auction you are bidding for. This is a great example for a good user cent...

Using iReport plugin for Jasper Reports in Netbeans

Image
Jasper reports is a very useful frame work for genarating reports, saving them as PDF,etc. iReport make it more easy because we can design reports using graphical methods from it. Also it is available as a plugin for NetBeans. You can download iReport Netbeans plugin from here . there are for files in the Zip folder. You can install them by at one by selecting all of them when you select the plugin to install from Netbeans (If you don't know how to install a plugin for Netbeans search for a tutorial). To use Jasper Reports in your application you have to add some libraries. But the problem is these libraries are heavily coupled with each other. So downloading each one is a very difficult task because there are problems like versions don't match, some libraries are outdated, etc.etc. There is a easy method. After installing the plugin Netbeans will automatically add the Jasper Reports library to its library collection. But it is missing one important...