How to find the current location of user with the help of mobile network provider in dual SIM devices?
<p>I am able to find the current location of user with the help of mobile network in single SIM devices but my code is not working for Dual SIM devices. </p>

<p>Is it possible to get the current location of user with the help of mobile network provider in dual SIM devices?</p>

<p>Here is the code that I am using, please tell me if there is any fault in it.</p>

<pre><code>LocationManager locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);

        LocationListener locationListener = new LocationListener() {

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

            public void onProviderEnabled(String provider) {}

            public void onProviderDisabled(String provider) {}

            @Override
            public void onLocationChanged(Location location) {
                // TODO Auto-generated method stub
        // Called when a new location is found by the network location provider.
                  makeUseOfNewLocation(location);
            }

            private void makeUseOfNewLocation(Location location) {
                // TODO Auto-generated method stub
                double lat= location.getLatitude();
                String lats=Double.toString(lat);

                double log=location.getLongitude();
                String logs=Double.toString(log);

Toast.makeText(getApplicationContext(), "Latitude is:"+lats,Toast.LENGTH_LONG).show();
Toast.makeText(getApplicationContext(), "Longitude is :"+logs,Toast.LENGTH_LONG).show();
            }
          };
</code></pre>
