Search Results

Search found 5 results on 1 pages for 'rockon'.

Page 1/1 | 1 

  • Map refresh problem mapview.invalidate() method is not working

    - by RockOn
    Hi friends! In my application I tried to search diff map location using diff lat and long. First time the application show the map but wen i change the lat long and try to invalidate the mapview using diff lat long, map is not refreshed. Below is my code please have a look and suggest accordingly: //Source code protected void onCreate(Bundle icicle) { // TODO Auto-generated method stub super.onCreate(icicle); setContentView(R.layout.main); infoTextView = (TextView) findViewById(R.id.infoTextView); // Finding Current Location locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1l, 1l, this); Location location = locationManager.getLastKnownLocation("gps"); // mock location by hard-code if DDMS has not sent a fake loc to the emulator. if (location == null) { lat = 13.6972 * 1E6; lng = 100.5150 * 1E6; } else { // get real location if can retrieve the location sent by DDMS or GPS lat = location.getLatitude() * 1E6; lng = location.getLongitude() * 1E6; } setGPSLocation(lat, lng); } //This is the function which I am calling with different lat and long public void setGPSLocation(Double lati, Double longi) { lat = lati; lng = longi; System.out.println("Latitude :"+ lat +" Longitude :"+lng); // Prepare text being shown String tmpLoc = LOC_INFO_TEMPLATE; tmpLoc = tmpLoc.replace("lg", String.valueOf(lng)); tmpLoc = tmpLoc.replace("lt", String.valueOf(lat)); infoTextView.setText(tmpLoc); // Setup Zoom/Hide Buttons linearLayout = (LinearLayout) findViewById(R.id.zoomview); mapView = (MapView) findViewById(R.id.mapview); mapView.invalidate(); mapView.setBuiltInZoomControls(true); //new by me mapView.setSatellite(true); // Set satellite view mZoom = (ZoomControls) mapView.getZoomControls(); linearLayout.addView(mZoom); // Setup Marker mapOverlays = mapView.getOverlays(); drawable = this.getResources().getDrawable(R.drawable.marker); itemizedOverlay = new MyItemizedOverlay(drawable); GeoPoint point = new GeoPoint(lat.intValue(), lng.intValue()); OverlayItem overlayitem = new OverlayItem(point, "", ""); itemizedOverlay.addOverlay(overlayitem); mapOverlays.add(itemizedOverlay); // Centralize Current Location myMapController = mapView.getController(); myMapController.setZoom(DEFAULT_ZOOM_NUM); centerlizeCurrentLocation(point); } Any suggest is truly appreciable.

    Read the article

  • Programmatically find device support GPS or not?

    - by RockOn
    Hi! I am trying to find a code which will help to me to find out the device which I used it has a GPS feature or not? I dont want to know its GPS is enable or disable. I just want to that the device has GPS hardware or not throug program. Anyone have any idea pls help.. Thanks and regards. Mintu

    Read the article

  • How to finish series of open sub-activities from one activity?

    - by RockOn
    Hi, I am trying to make an exit button for my application. Anyhow I am able to track all the instance of activity in my application and then finish them all. But still some activity remain alive in some cases. Dont know how. Is there any method to kill a particular application in android. Or any other way can I exit from my application. Thanks

    Read the article

  • Filtering out emoticons using sed

    - by user349222
    Hello, I have a grep expression using cygwin grep on Win. grep -a "\\,,/\|\\m/\|\\m/\\>\.</\\m/\|:u" all_fbs.txt > rockon_fbs.txt Once I identify the emoticon class, however, I want to strip them out of the data. However, the same regexp above within a sed results in a syntax error (yes, I realize I could use /d instead of //g, but this doesn't make a difference, I still get the error.) sed "s/\(\\,,/\|\\m/\|\\m/\\>\.</\\m/\|:u\)*//g" The full line is: grep -a "\\,,/\|\\m/\|\\m/\\>\.</\\m/\|:u" all_fbs.txt | sed "s/\(\\,,/\|\\m/\|\\m/\\>\.</\\m/\|:u\)*//g" | sed "s/^/ROCKON\t/" > rockon_fbs.txt The result is: sed: -e expression #1, char 14: unknown option to `s' I know it's coming from the sed regexp I'm asking about it b/c if I remove that portion of the full line, then I get no error (but, of course, the emoticons are not filtered out). Thanks in advance, Steve

    Read the article

1