Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 73: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 74: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 75: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 76: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 77: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 78: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
@Override /** Called when the activity is first created. */ public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); getLocation(); setupWebView(); this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); } private void setupWebView() { final String centerURL = "javascript:centerAt(" + mostRecentLocation.getLatitude() + "," + mostRecentLocation.getLongitude() + ")"; webView = (WebView) findViewById(R.id.webview); // Get rid of white line on the right webView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY); webView.getSettings().setJavaScriptEnabled(true); // Wait for the page to load then send the location information webView.setWebViewClient(new WebViewClient() { @Override public void onPageFinished(WebView view, String url) { webView.loadUrl(centerURL); } }); webView.loadUrl(MAP_URL); } /** * The Location Manager manages location providers. This code searches for * the best provider of data (GPS, WiFi/cell phone tower lookup, some other * mechanism) and finds the last known location. **/ private void getLocation() { locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); if (!locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) { createGpsDisabledAlert(); } Criteria criteria = new Criteria(); criteria.setAccuracy(Criteria.ACCURACY_FINE); provider = locationManager.getBestProvider(criteria, true); // In order to make sure the device is getting location, request // updates. // Look to tweaking the arguments to this for a smooth ride locationManager.requestLocationUpdates(provider, 1, 0, this); mostRecentLocation = locationManager.getLastKnownLocation(provider); } private void createGpsDisabledAlert() { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setMessage("Your GPS is disabled! Would you like to enable it?") .setCancelable(false) .setPositiveButton("Enable GPS", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { showGpsOptions(); } }); builder.setNegativeButton("Use Wifi or 3g for location", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dialog.cancel(); } }); AlertDialog alert = builder.create(); alert.show(); } private void showGpsOptions() { Intent gpsOptionsIntent = new Intent( android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS); startActivity(gpsOptionsIntent); } // Menu setup @Override public boolean onCreateOptionsMenu(Menu menu) { menu.add(0, 0, 0, R.string.close).setIcon( android.R.drawable.ic_menu_close_clear_cancel); return super.onCreateOptionsMenu(menu); } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case 0: super.onStop(); super.onDestroy(); this.finish(); return true; default: return super.onOptionsItemSelected(item); } } @Override protected void onResume() { locationManager.requestLocationUpdates(provider, 1, 0, this); super.onResume(); } @Override protected void onPause() { locationManager.removeUpdates(this); super.onPause(); } /** Sets the mostRecentLocation object to the current location of the device **/ public void onLocationChanged(Location location) { mostRecentLocation = location; final String centerURL = "javascript:centerAt(" + mostRecentLocation.getLatitude() + "," + mostRecentLocation.getLongitude() + ")"; // This line is good to update the map with the current location webView.loadUrl(centerURL); }