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 /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

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

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

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 /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - GPS activation

GPS activation

Put problem concerning MapActivities, MapViews, Overlays and GPS in this forum.

GPS activation

Postby nottix » Wed May 12, 2010 1:15 pm

Hi guys,

i have to activate GPS without launch the Intent.
I saw that locale app can do this. Is there any trick to bypass this mechanism?

Thanks
nottix
Freshman
Freshman
 
Posts: 2
Joined: Wed May 12, 2010 1:10 pm

Top

Postby mdamen » Wed May 12, 2010 11:12 pm

It's done using a background service.
Have a look into that..
mdamen
Freshman
Freshman
 
Posts: 2
Joined: Wed May 12, 2010 11:00 pm

Postby nottix » Wed May 12, 2010 11:17 pm

Which background service? LocationManagerService?
nottix
Freshman
Freshman
 
Posts: 2
Joined: Wed May 12, 2010 1:10 pm

Re: GPS activation

Postby Eagle Eye » Mon May 24, 2010 8:34 pm

LocationManager locMgr = (LocationManager)this.getSystemService(Context.LOCATION_SERVICE);

//set your locationListener here

locMgr.requestLocationUpdates(
LocationManager.GPS_PROVIDER,
0, // set minTime in ms
0, // set minDistance in meters
locListener);

and you must create locListener for e.g.:

Code: Select all
LocationListener locListener = new LocationListener()
{
public void onLocationChanged(Location location)
{
if (location != null)
{
Toast.makeText(getBaseContext(),
"New location latitude [" +
location.getLatitude() +
"] longitude [" + location.getLongitude()+"]",
Toast.LENGTH_SHORT).show();
}
}
public void onProviderDisabled(String provider)
{
}
public void onProviderEnabled(String provider)
{
}
public void onStatusChanged(String provider,
int status, Bundle extras)
{
}
};
Eagle Eye
Junior Developer
Junior Developer
 
Posts: 14
Joined: Sun May 23, 2010 6:38 am

Top

Return to Map Problems

Who is online

Users browsing this forum: No registered users and 2 guests