error while sending location lat and long to the server
<pre><code>public void onLocationChanged(Location loc)
{

    GeoPoint point = new GeoPoint((int)(loc.getLatitude() * 1E6),
                      (int)(loc.getLongitude() * 1E6));

    String Text = "My current location is: " +
        "Latitud =" + loc.getLatitude() + "Longitud =" + loc.getLongitude();

    Toast.makeText(getApplicationContext(),
               Text, Toast.LENGTH_SHORT).show();

    double x = loc.getLatitude();
    double y = loc.getLongitude();
    try {
        outToServer.writeDouble(x);
        outToServer.writeDouble(y);
    } catch(IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
    mc.animateTo(point);
}
</code></pre>

<p>I already open socket on my first activity, then click next. Here is my second one, I want to send the lat and log data to the server.</p>

<pre><code>05-31 02:05:41.055: DEBUG/StatusBarPolicy(180): [GPS ICON] GPS_ENABLED_CHANGE_ACTION or GPS_FIX_CHANGE_ACTION
05-31 02:05:41.125: ERROR/AndroidRuntime(6365): FATAL EXCEPTION: main
05-31 02:05:41.125: ERROR/AndroidRuntime(6365): java.lang.NullPointerException
05-31 02:05:41.125: ERROR/AndroidRuntime(6365):     at yaraby.y.yarab$MyLocationListener.onLocationChanged(yarab.java:354)
05-31 02:05:41.125: ERROR/AndroidRuntime(6365):     at android.location.LocationManager$ListenerTransport._handleMessage(LocationManager.java:191)
05-31 02:05:41.125: ERROR/AndroidRuntime(6365):     at android.location.LocationManager$ListenerTransport.access$000(LocationManager.java:124)
05-31 02:05:41.125: ERROR/AndroidRuntime(6365):     at android.location.LocationManager$ListenerTransport$1.handleMessage(LocationManager.java:140)
05-31 02:05:41.125: ERROR/AndroidRuntime(6365):     at android.os.Handler.dispatchMessage(Handler.java:99)
05-31 02:05:41.125: ERROR/AndroidRuntime(6365):     at android.os.Looper.loop(Looper.java:123)
05-31 02:05:41.125: ERROR/AndroidRuntime(6365):     at android.app.ActivityThread.main(ActivityThread.java:4633)
05-31 02:05:41.125: ERROR/AndroidRuntime(6365):     at java.lang.reflect.Method.invokeNative(Native Method)
05-31 02:05:41.125: ERROR/AndroidRuntime(6365):     at java.lang.reflect.Method.invoke(Method.java:521)
05-31 02:05:41.125: ERROR/AndroidRuntime(6365):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
05-31 02:05:41.125: ERROR/AndroidRuntime(6365):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
05-31 02:05:41.125: ERROR/AndroidRuntime(6365):     at dalvik.system.NativeStart.main(Native Method)
</code></pre>
