location-provider

AngularJs routeProvider 404

孤者浪人 提交于 2019-12-02 14:05:22
问题 Code bellow is from AngularJs tutorials and little bit modified by me. I wish to remove hash from url. I actually succeed, but now I have other problem. When I use link localhost, it works just fine and redirect me to localhost/phones. But in case, that I try with direct link localhost/phones, browser throws me 404 error. Why is that so? Code: var phonecatApp = angular.module('phonecatApp', [ 'ngRoute', 'phonecatControllers' ]); phonecatApp.config(['$routeProvider', '$locationProvider'

How to get Location with Wifi in Android?

三世轮回 提交于 2019-11-30 21:25:13
I Want get location with Wifi and work in Google map, and it's not work for me but Gps is okay and not problem. my code: locationManager = (LocationManager) getSystemService(LOCATION_SERVICE); if (locationManager != null) { boolean gpsIsEnabled = locationManager .isProviderEnabled(LocationManager.GPS_PROVIDER); boolean networkIsEnabled = locationManager .isProviderEnabled(LocationManager.NETWORK_PROVIDER); if (gpsIsEnabled) { locationManager.requestLocationUpdates( LocationManager.GPS_PROVIDER, 5000L, 10F, (android.location.LocationListener) this); } else if (networkIsEnabled) {

Fused Location Provider in Android

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-30 09:19:41
I am developing an app using Fused Location Provider. I have a doubt. For getting location in regular intervals it uses requestLocationUpdates(). But from which source is it get the location either from WIFI or GPS or Network. In my app, it gets location in regular intervals only when WiFi is ON. When WiFi is in OFF state, then it can't get the location(it supposed to get location from some other source either form GPS or Network. But it never get location. Or i have to write listeners for GPS and Network). I don't know what is the problem. Can anyone help me. And, whether it works only when

How to get Location with Wifi in Android?

泄露秘密 提交于 2019-11-30 05:38:01
问题 I Want get location with Wifi and work in Google map, and it's not work for me but Gps is okay and not problem. my code: locationManager = (LocationManager) getSystemService(LOCATION_SERVICE); if (locationManager != null) { boolean gpsIsEnabled = locationManager .isProviderEnabled(LocationManager.GPS_PROVIDER); boolean networkIsEnabled = locationManager .isProviderEnabled(LocationManager.NETWORK_PROVIDER); if (gpsIsEnabled) { locationManager.requestLocationUpdates( LocationManager.GPS

IllegalArgumentException: provider doesn't exisit: null on Maps V1

妖精的绣舞 提交于 2019-11-30 03:04:07
I'm using Google Maps API V1. I have this error : java.lang.IllegalArgumentException: provider doesn't exisit: null This is my code : locationManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); Criteria criteria = new Criteria(); criteria.setAccuracy(Criteria.ACCURACY_FINE); String provider = locationManager.getBestProvider(criteria, true); if (provider != null) { startTime = System.currentTimeMillis(); geoLocTimeOutTask = new GeoLocTimeOutTask(); geoLocTimeOutTask.execute(); locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, locationListener

Issue with html5Mode in angularjs

☆樱花仙子☆ 提交于 2019-11-29 11:01:02
I'm trying to remove index.html of the url using html5Mode(true) in angularjs, this is the code: angular.module('myApp', [ 'ngRoute', 'myApp.filters', 'myApp.services', 'myApp.directives', 'myApp.controllers' ]). config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) { $locationProvider.html5Mode(true); $routeProvider.when('/home', {templateUrl: 'views/home.html'}); $routeProvider.when('/about', {templateUrl: 'views/about.html'}); $routeProvider.otherwise({redirectTo: '/'}); }]); If I dont write $locationProvider.html5Mode(true); the url shows: localhost:

IllegalArgumentException: provider doesn't exisit: null on Maps V1

十年热恋 提交于 2019-11-29 00:39:46
问题 I'm using Google Maps API V1. I have this error : java.lang.IllegalArgumentException: provider doesn't exisit: null This is my code : locationManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); Criteria criteria = new Criteria(); criteria.setAccuracy(Criteria.ACCURACY_FINE); String provider = locationManager.getBestProvider(criteria, true); if (provider != null) { startTime = System.currentTimeMillis(); geoLocTimeOutTask = new GeoLocTimeOutTask(); geoLocTimeOutTask

Network location provider not giving location android

a 夏天 提交于 2019-11-28 10:38:24
I am developing a small android application in which I want to find out the user's current location by using the network provider. I tried this in following ways but it's not giving me any output : networklocationManager = (LocationManager) this .getSystemService(Context.LOCATION_SERVICE); // Define a listener that responds to location updates LocationListener networklocationListener = new LocationListener() { public void onLocationChanged(Location location) { Log.i("********************************", "this is my network location " + location); String Location_text = "NETWORK LOCATION latitude

android get location from best provider available

天涯浪子 提交于 2019-11-28 06:59:35
I have this code to get the best available provider lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE); locationListener = new MyLocationListener(); Criteria criteria = new Criteria(); criteria.setAccuracy(Criteria.ACCURACY_FINE); String provider = lm.getBestProvider(criteria, true); Location mostRecentLocation = lm.getLastKnownLocation(provider); if(mostRecentLocation != null) { latid=mostRecentLocation.getLatitude(); longid=mostRecentLocation.getLongitude(); } lm.requestLocationUpdates(provider, 1, 0, locationListener); and then the listener private class MyLocationListener

Network location provider not giving location android

大憨熊 提交于 2019-11-27 03:49:45
问题 I am developing a small android application in which I want to find out the user's current location by using the network provider. I tried this in following ways but it's not giving me any output : networklocationManager = (LocationManager) this .getSystemService(Context.LOCATION_SERVICE); // Define a listener that responds to location updates LocationListener networklocationListener = new LocationListener() { public void onLocationChanged(Location location) { Log.i("*************************