Here is the error i got when i run my android code contains two
activities .

     enter code here
     05-29 19:23:42.131: ERROR/libgps(180): onUnsol: cmd 0x04 plen 57
    05-29 19:23:42.131: ERROR/libgps(180): oem_unsol_gps_measurement:
num_sv 3
        05-29 19:23:42.131: ERROR/libgps(180):
oem_unsol_gps_measurement: used_in_fix_mask 0000014E
    05-29 19:23:42.384: WARN/ActivityManager(180): Activity destroy
timeout for HistoryRecord{49f447f0 yaraby.y/.yarab}
     05-29 19:23:43.136: ERROR/libgps(180): onUnsol: cmd 0x04 plen 57
     05-29 19:23:43.136: ERROR/libgps(180): oem_unsol_gps_measurement:
num_sv 3
     05-29 19:23:43.136: ERROR/libgps(180): oem_unsol_gps_measurement:
used_in_fix_mask 0000014E
     05-29 19:23:44.136: ERROR/libgps(180): onUnsol: cmd 0x04 plen 57
     05-29 19:23:44.136: ERROR/libgps(180): oem_unsol_gps_measurement:
num_sv 3
     05-29 19:23:44.136: ERROR/libgps(180): oem_unsol_gps_measurement:
used_in_fix_mask 0000014E
     05-29 19:23:45.131: ERROR/libgps(180): onUnsol: cmd 0x04 plen 57
     05-29 19:23:45.131: ERROR/libgps(180): oem_unsol_gps_measurement:
num_sv 3
     05-29 19:23:45.131: ERROR/libgps(180): oem_unsol_gps_measurement:
used_in_fix_mask 0000014E
     05-29 19:23:46.135: ERROR/libgps(180): onUnsol: cmd 0x04 plen 57
     05-29 19:23:46.135: ERROR/libgps(180): oem_unsol_gps_measurement:
num_sv 3
      05-29 19:23:46.135: ERROR/libgps(180):
oem_unsol_gps_measurement: used_in_fix_mask 0000014E
     05-29 19:23:47.136: ERROR/libgps(180): onUnsol: cmd 0x04 plen 57
     05-29 19:23:47.136: ERROR/libgps(180): oem_unsol_gps_measurement:
num_sv 3
     05-29 19:23:47.136: ERROR/libgps(180): oem_unsol_gps_measurement:
used_in_fix_mask 0000014E
     05-29 19:23:48.131: ERROR/libgps(180): onUnsol: cmd 0x04 plen 57
      05-29 19:23:48.131: ERROR/libgps(180):
oem_unsol_gps_measurement: num_sv 3
      05-29 19:23:48.131: ERROR/libgps(180):
oem_unsol_gps_measurement: used_in_fix_mask 0000014E
     05-29 19:23:49.135: ERROR/libgps(180): onUnsol: cmd 0x04 plen 57
      05-29 19:23:49.135: ERROR/libgps(180):
oem_unsol_gps_measurement: num_sv 3
       05-29 19:23:49.135: ERROR/libgps(180):
oem_unsol_gps_measurement: used_in_fix_mask 0000014E
      05-29 19:23:50.135: ERROR/libgps(180): onUnsol: cmd 0x04 plen 57
      05-29 19:23:50.135: ERROR/libgps(180):
oem_unsol_gps_measurement: num_sv 3
      05-29 19:23:50.135: ERROR/libgps(180):
oem_unsol_gps_measurement: used_in_fix_mask 0000014E
      05-29 19:23:51.131: ERROR/libgps(180): onUnsol: cmd 0x04 plen 57
     05-29 19:23:51.131: ERROR/libgps(180): oem_unsol_gps_measurement:
num_sv 3
     05-29 19:23:51.131: ERROR/libgps(180): oem_unsol_gps_measurement:
used_in_fix_mask 0000014E

the code its a map view and contains button start so that when i click
on it  its send the string data lat and long to my server

    enter code here
    package yaraby.y;




        public class yarab extends MapActivity

        {
            Socket clientSocket;
            TextView Text;
                private MapView mapView;
                private MapController mc;
            DataOutputStream outToServer;
            BufferedReader inFromServer ;
             Button start;

                 int error = 50;
                GeoPoint p, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12,
p13,p14,p15,p16,p17,p18,p19,p20,p21,p22,p23,p24,p25,p26,p27,p28,p29;
                List<Overlay> mapOverlays;
                Drawable drawable, drawable2, drawable3, drawable4, drawable6,
drawable7,
                                drawable8, drawable9, drawable10, drawable11, 
drawable12,
                                drawable13, drawable5, drawable14, drawable15, 
drawable16,
drawable17, drawable18, drawable19, drawable20, drawable21,
drawable22, drawable23, drawable24, drawable25, drawable26,
drawable27, drawable28, drawable29;
                HelloItemizedOverlay itemizedOverlay, itemizedOverlay2,
itemizedOverlay3,
                                itemizedOverlay4, itemizedOverlay5, 
itemizedOverlay6,
                                itemizedOverlay7, itemizedOverlay8, 
itemizedOverlay9,
                                itemizedOverlay10, itemizedOverlay11, 
itemizedOverlay12,
                                itemizedOverlay13, itemizedOverlay14, 
itemizedOverlay15,
itemizedOverlay16, itemizedOverlay17, itemizedOverlay18,
itemizedOverlay19, itemizedOverlay20, itemizedOverlay21,
itemizedOverlay22, itemizedOverlay23, itemizedOverlay24,
itemizedOverlay25, itemizedOverlay26, itemizedOverlay27,
itemizedOverlay28, itemizedOverlay29;
                LocationManager locationManager;
                Button next;
                /** Called when the activity is first created. */

                @Override
                public void onCreate(Bundle savedInstanceState)

                {
                                super.onCreate(savedInstanceState);

                                setContentView(R.layout.main2);

                                /* Use the LocationManager class to obtain GPS 
locations */

                                LocationManager mlocManager = (LocationManager)
getSystemService(Context.LOCATION_SERVICE);

                                LocationListener mlocListener = new 
MyLocationListener();

        
mlocManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0,
                                                0, mlocListener);
                                mapView = (MapView) findViewById(R.id.mapView);

                                // enable Street view by default
                                mapView.setStreetView(true);

                                // enable to show Satellite view
                                mapView.setSatellite(true);

                                // enable to show Traffic on map
                                // mapView.setTraffic(true);
                                mapView.setBuiltInZoomControls(true);

                                mc = mapView.getController();
                                // mapView.setStreetView(true);
                                // mapView.setSatellite(true);
                                mc.setZoom(12);
                            start=(Button)findViewById(R.id.start);
                        //       next = (Button) findViewById(R.id.Button02);
                        //              next.setOnClickListener(new 
OnClickListener() {

                                        //      @Override
                                //              public void onClick(View v) {
                                        //              Intent i = new 
Intent(yarab.this, yaraby.class);
                                 //yarab.this.startActivity(i);
                                        //      }});
                                                }

                                //addOverLays();}








                public void addOverLays() {
                        String[] coordinates = { "31.216487288475037",
"29.932637214660645",
                                        "30.084123015403748", "51.5002", 
"-0.1262",
                                        "31.337149143218994" };
                        double lat = 29.98739718380868, lat2 = 
29.987810254096985, lat3 =
29.987574219703674, lat4 = 29.98718498160553, lat5 =
29.98716115951538, lat6 = 29.987241625785828,lat7=
29.98763859272003,lat8=29.9851870536842,lat9=29.987795260925;
                        double log = 31.442527770886084, log2 = 
31.44258677959442, log3 =
31.44225418567575, log4 = 31.442527770996094, log5 =
31.442500948905945, log6 =
31.44260823726654,log7=31.44251167742004,log8=31.44262969493866,log9=31.44258677959442;

                        p = new GeoPoint((int) (lat * 1E6), (int) (log * 1E6));
                        p2 = new GeoPoint((int) (lat2 * 1E6 ), (int) (log2 * 
1E6 ));
                        p3 = new GeoPoint((int) (lat3 * 1e6), (int) (log3 * 
1e6));

                        mapOverlays = mapView.getOverlays();
                        drawable = 
this.getResources().getDrawable(R.drawable.wit);
                        drawable2 = 
this.getResources().getDrawable(R.drawable.ballon);
                        drawable3 = 
this.getResources().getDrawable(R.drawable.blackaaaaa);


                        itemizedOverlay = new HelloItemizedOverlay(drawable, 
this);
                        itemizedOverlay2 = new HelloItemizedOverlay(drawable2, 
this);
                        itemizedOverlay3 = new HelloItemizedOverlay(drawable3, 
this);
                        itemizedOverlay4 = new HelloItemizedOverlay(drawable4, 
this);

                        itemizedOverlay.addOverlay(overlayitem);

                        mapOverlays.add(itemizedOverlay);

                        itemizedOverlay2.addOverlay(over2);
                        mapOverlays.add(itemizedOverlay2);

                        itemizedOverlay3.addOverlay(over3);
                        mapOverlays.add(itemizedOverlay3);

                        itemizedOverlay4.addOverlay(over4);
                        mapOverlays.add(itemizedOverlay4);


                        mc.setZoom(17);
                        mc.animateTo(p2);
                       }
                public void Location(){



                        LocationManager myLocationManager =
(LocationManager)getSystemService(Context.LOCATION_SERVICE);


                        LocationListener mlocListener1 = new 
MyLocationListener();

                        LocationManager mlocManager1 = null;
                        
mlocManager1.requestLocationUpdates(LocationManager.GPS_PROVIDER,
0,
                                        0, mlocListener1);
                                  GeoPoint initGeoPoint = new GeoPoint((int)
(myLocationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER)
                   .getLatitude()*1000000),(int)
(myLocationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER).getLongitude()*1000000));
                   mc.animateTo(initGeoPoint);
                mc.setZoom(16);

                drawable21 = this.getResources().getDrawable(R.drawable.ggg);
                        itemizedOverlay21 = new 
HelloItemizedOverlay(drawable21,this);
                        OverlayItem over21 = new OverlayItem(initGeoPoint, 
"offff",
"over21");

                        itemizedOverlay21.addOverlay(over21);
                mapOverlays.add(itemizedOverlay21);
                }

                /* Class My Location Listener */

                public class MyLocationListener implements LocationListener

                {

                        @Override
                        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();
                                try {
                                        outToServer.writeBytes(Text);
                                } catch (IOException e) {
                                        // TODO Auto-generated catch block
                                        e.printStackTrace();
                                }

        mc.animateTo(point);


                        }


                        private Resources getResources() {
                                // TODO Auto-generated method stub
                                return null;
                        }


                        public void onProviderDisabled(String provider)

                        {

                                Toast.makeText(getApplicationContext(),

                                "Gps Disabled",

                                Toast.LENGTH_SHORT).show();

                        }

                        public void onProviderEnabled(String provider)

                        {

                                Toast.makeText(getApplicationContext(),

                                "Gps Enabled",

                                Toast.LENGTH_SHORT).show();

                        }

                        public void onStatusChanged(String provider, int 
status, Bundle
extras)

                        {

                        }

                        protected boolean isRouteDisplayed() {
                                return false;
                        }

                }/* End of Class MyLocationListener */

                @Override
                protected boolean isRouteDisplayed() {
                        // TODO Auto-generated method stub
                        return false;
                }





           }

 And here is the Main

    enter code here
       <Button android:text="start"
        android:id="@+id/start"
        android:layout_width="250px"
            android:textSize="18px"
        android:layout_height="55px"
        android:onClick="onLocationChanged">
         </Button>



-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to