Thursday, 29 September 2011

My Proposed Career Path and Also Thankfull to ALL


I am graduated from Bhavnagar University in BCA and I am pursuing MCA[Present on fourth semester], and  after that I also want to do some challenging work in my professional life like all good personalities.

But firstly, I would like to thanks some of personalities. All are helping me up-to now and makes me happy and builds up some positive attitude in me during my education...

1. My parents
2. My gurus, without them I do not think all its been possible.
  • Mr. Patel Sir - Principal in Shree Swaminarayan College of Computer Science Bhavnagar.
  • Mr. Kalpesh Sir - Working as Head of Department in Shree Swaminarayan College of Computer Science, Bhavnagar
  • Mr. Pratik Gohil - Working as Sr. Asst. Professor in MCA Department with S. V. Institute    of Computer Studies, Kadi.
  • Mr. Rajiv Parikh - Working as Professor in Shree Swaminarayan College of Computer Science, Bhavnagar.
  • and my all gurus who helps me directly or indirectly....
3. My Friends thanks for their warmly help and support. 
4. Last but not least All of my well wisher.

While from now onwards I wish to start my career in Information Technology, for that some of the basic professional concepts must have in me and also a simple positive attitude towards my professional IT Career.
For that something comes to my mind and I have curious to follow it throughout my career.

"Below are my proposed Career Path"
  • Programmer
  • Analyst/Programmer
  • Team Leader
  • Project Manager
  • Systems Development Manager
  • Executive Director - Systems
  • CIO [Chief Information Officer]
"Interested in New Technology Learning"
  • Mobile Computing using Android Technologies
  • Mobile Cloud Computing 
  • Interested in developing some innovative apps in mobile technologies.

Thursday, 8 September 2011

App to find nearest location using GPS in android


One of the major functionality provided by the smartphone is GPS [Global Positioning System] enable. I never realized that interacting with GPS functionality is so easy until I worked with it. This article is a way to help people realize the same.This article is targeted to a beginner who wants to implement GPS functionality and work with Google Maps API as well. 
" Challenges During getting location into Google maps"
  • First Question arise in mind is that When we want to get current location in our apps then how our phone  find out Geo Co-Ordinates [Latitude and Longitude] values?
    • With respect to this question as per my knowledge phone gets current location using different quipped devices and methods like.... GPS, USING NETWORK PROVIDER, AND OFF COURSE USING INTERNET CONNECTION.  
  • Second Question arise in mind is that How it all be possible?
    •  With respect to this question, we have basic knowledge of android sdk, how to create simple application in android and have conceptually clear in different component of project like Activity, Intents, Views, XML Viewer, Activity Life cycle, basic knowledge of AndroidManifest.xml, Emulator, basic knowledge of Eclipse, and last but not least is Android Emulator, and DDMS, Because without it we might be not able to build this application.
  • For rest of answer of your questions please go through this tutorial and if you have any doubt then comment it at last of article...
Before proceed we getting knowledge about Google api key. The first and foremost thing is getting a Google Maps API key. Getting one is relatively easy but it requires our application to be signed with a certificate and notify Google about Hash (MD5) fingerprint of the certificate. Now, the process can be further divided into two parts: 
[1] Getting google map api key (fist get fingerprint key values and after that use it for getting map api key.)
[2] After getting google map api key used it into your android application for authorizing your app. for that you have to put whole key into xml file of your view.


Now some Questions are arises in mind like How to get map api key? How to use it ? So, the answer is given below.


We create new certificate using keytool.exe available in your java\bin directory, into your command prompt type following command...

keytool -list -alias androiddebugkey -keystore "your path put here\debug.keystore" -storepass android -keypass android



In above command we used one file name is "debug.keystore", is used for using app in debug mode and we get md5 Google map api key and whole debugging structure stored or located into your own file. after running above command you will get your fingerprint md5 Google map key. after that Go to google api signup page and use your fingerprint key for getting apikey.


After that Create New Android Project, Create new AVD with target mode =  Google APIs


after that first you have to setup your geo location in emulator, because if you tested your app in emulator then it will not directly get current location, we have to supply it explicitly.


for that open your cmd, type "telnet localhost <your emulator port no like... 5554>"
and now set your current location into your phones GPS by applying command  
geo fix <Latitude value> <Longitude value>


Now first step is open your main.xml file and put code given below


<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/mainlayout"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >

    <com.google.android.maps.MapView
        android:id="@+id/mapview"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:clickable="true"
        android:enabled="true"
        android:apiKey="Your APIKEY goes here..."
    />
</RelativeLayout>


Second step is to update your AndroidManifest.xml file

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.gaurang.android.MapView"
      android:versionCode="1"
      android:versionName="1.0">
    <uses-sdk android:minSdkVersion="7" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> 
    <uses-permission android:name="android.permission.INTERNET" />
   
    <application android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:name="com.gaurang.android.MapsViews.MapsView"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
<uses-library android:required="true" android:name="com.google.android.maps">
</uses-library>
    </application>
</manifest>


Third step is to code for our application so open your Activity.java file

package com.gaurang.android.MapsViews;

import android.content.Context;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle;
import android.util.Log;
import android.widget.RelativeLayout;
import android.widget.Toast;

import com.gaurang.android.MapView.R;
import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapController;
import com.google.android.maps.MapView;


public class MapsView extends MapActivity {
    /** Called when the activity is first created. */
    private MapController mapController;
    private MapView mapView;
    private LocationManager locationManager;
   
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main); //// bind the layout to the activity
       
     // create a map view
        RelativeLayout linearLayout = (RelativeLayout) findViewById(R.id.mainlayout);
        mapView = (MapView) findViewById(R.id.mapview);
        mapView.setBuiltInZoomControls(true);
        mapView.setStreetView(true);
        mapController = mapView.getController();
        mapController.setZoom(16); // Zoon 1 is world view
        locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
        locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0,0, new GeoUpdateHandler());
    }

    @Override
    protected boolean isRouteDisplayed() {
        // TODO Auto-generated method stub
        return false;
    }
   
    public class GeoUpdateHandler implements LocationListener {

        @Override
        public void onLocationChanged(Location location) {
            if (location !=null){
                //int lat = (int) (location.getLatitude() * 1E6);
                //int lng = (int) (location.getLongitude() * 1E6);
                GeoPoint point = new GeoPoint(
                          (int) (location.getLatitude() * 1E6),
                          (int) (location.getLongitude() * 1E6));
               
                Toast.makeText(getBaseContext(),
                          "Latitude: " + location.getLatitude() +
                          " Longitude: " + location.getLongitude(),
                          Toast.LENGTH_LONG).show();
               
                Log.i("GPS Cordinates", "LAT= "+ location.getLatitude() + "LONG= "+ location.getLongitude());
               
                //mapController.animateTo(point);
                    mapController.setCenter(point);
                mapController.setZoom(16);
                mapView.invalidate();
            }
        }
           
        @Override
        public void onProviderDisabled(String provider) {
        }

        @Override
        public void onProviderEnabled(String provider) {
        }

        @Override
        public void onStatusChanged(String provider, int status, Bundle extras) {
        }
    }   
}

Now test your app into your emulator and see the map of your current(nearest) location. You also required to do change in above code as per your settings and packages files and also as per your project and activity name.

The class "LocationManager" provides access to the location.You can register a "LocationListener" with the "LocationManager" and will receive periodic updates about the geoposition. The class "LocationProvider" is the superclass of the different location providers which deliver the information about the current location. 

Each and every time when user changes location of phone then automatically fires  public void onLocationChanged(Location location) method and what we written into this whole runs successfully. onLocationChanged(Location location) method is given into the class LocationListner and we used this method as a method Override concepts.


So i think from my side i explained you with short content but after reading this i wish that it will be useful to various beginner developer like me so 
"Keep sharing your knowledge and also use your knowledge"

Thanks to all who read this content.

Tuesday, 6 September 2011

"Some Things To Always Remember OR Some Things Can Change Your Life"

Your presence is a present to the world.
You are unique and one of a kind.
Your life can be what you want it to be.
Take the days just one at a time. 

Count your blessings, not your troubles.
You will make it through whatever comes along.
Within you are so many answers.


Understand, have courage, be strong.
Do not put limits on yourself.

So many dreams are waiting to be realized.
Decisions are too important to leave to chance.
Reach for your peak, your goal and your prize. 

Nothing wastes more energy than worrying.
The longer one carries a problem the heavier it gets.

Do not take things too seriously.
Live a life of serenity, not a life of regrets. 

Remember that a little love goes a long way.
Remember that a lot … goes forever.
Remember that friendship is a wise investment.
Life’s treasure are people together. 

Realize that it is never too late.
Do ordinary things in an extraordinary way.
Have hearth and hope and happiness.
Take the time to wish upon a start. 

AND DO NOT EVER FORGET ….
FOR EVEN A DAY HOW VERY SPECIAL YOU ARE !


  • We all lives in real world, and we are human beings so basic nature of being human we always thinks much more so while thinking why we not think in appropriate way, Why we not think that  theres always some imagination "DOT" behind every phase of life, But not all understand it, even I am also, But the only thing in our hand is that "Try...Try... after Every Try" , and once we definitely worth our expectations... and if it could not be your worth so again try...................................................

Monday, 5 September 2011

What should be in android apps developer?

  • "Android Apps Basics".  
  • Android is gaining more and more popularity nowadays. Every fresher mobile developer wants to know about android and also about what should be in fresher android apps. developer.
  • Before start thinking on Android apps development We should be well versed in Core Java concepts and off-course in Oops concepts also. 
  • So start thinking after that on some android stuff. for that we can able to know what is android? how we use it as a Mobile apps development? and also Do start searching over internet resources and we will definitely find out some interesting new things which we want to know...
  • So For Learning Android our first step is to visit site... 
  • After that understand the Features, Architecture, Application Framework, etc... 
  • http://developer.android.com/guide/topics/fundamentals.html , just go through this link and you will able to easily understand what is the whole fundamentals concepts behind android.
  • But the actual Question is still pending What should be in android apps developer?...
    • So the answer is given below as per my thinking and I followed these way also...
      • [I]   Develop your working environment for android apps development for that we    required Eclipse Latest Compatible version  for android SDK.                                       
      • [II]  We need to download Android SDK. (download it from above site link)
      • [III] Install latest JAVA JDK. (install JDK not only JRE) Because of only JRE is not installed whole java in your computer. Main difference between JRE and JDK is that JDK is used for Developing Java Programs and JRE is used for Running java programs which is already available in every computer by Operating System). 
      1. After that follow the instructions written on Android Developer sites. and set up your development environment. If you facing any problem while setting up Ask me may I solve your problem.
      2. After that start developing your First Hello World app in eclipes .....
        • for that Go to File -> New-> AndroidProject and create new project on android by entering details about your apps.     
 What is Activity? 
"Relation between Activity and View"
Defines a View to be displayed in its window, Its a presentation layer. Activity
is Screen which user uses it for input. An
application can have more than one activity. Each activity extends android.app.Activity, onCreate() method is overridden to create a user view - the actual layout is displayed over here.

What is View? 
A View is the visible part of the activity
Defined in an XML layout file (or in code)

What is Intent?
Starts another activity ("opens a new window")
Can pass data to the started activity
Can even start activities from another app

 What is Services?
Services runs in background and without user-interface. It extends service class. Typically used to run a services that need to be running even if the screen is closed
 
"The new Android Project created the above files and folders"
 Structure of Android Manifest.XML file


 I will be back with Further more content on this [Coming Soon...]