Note that there are some explanatory texts on larger screens.

plurals
  1. PONETWORK_PROVIDER not giving callback to onLocationChanged()
    primarykey
    data
    text
    <p>I'm developing an application in which I fetch user location using NETWORK_PROVIDER it works fine on almost all devices but on KARBONN A15 onLocationChanged() is never called when we use NETWORK_PROVIDER but if we enable or disable the Network Provider in settings onProviderEnabled() and onProviderDisabled() are getting called this rules out the possibility that probably location listener is not getting attached properly also if I use GPS_PROVIDER instead of NETWORK_PROVIDER than onLocationChanged is getting called perfectly.</p> <p>Below is code snippet :</p> <pre><code>@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); locationManager = (LocationManager) getSystemService(LOCATION_SERVICE); locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 10*1000, 0, this); } public void onLocationChanged(Location location) { Log.i("LocationDemo", "onLocationChanged() called with " + location.toString()); } public void onProviderDisabled(String provider) { Log.i("LocationDemo", "onProviderDisabled() called with " + provider); } public void onProviderEnabled(String provider) { Log.i("LocationDemo", "onProviderEnabled() called with " + provider); } public void onStatusChanged(String provider, int status, Bundle extras) { Log.i("LocationDemo", "onStatusChanged() called with " + provider); } </code></pre> <p>Thanks for your support I'm already in touch with Karbonn over this. Is there anything I can do to check what's wrong with the device it would helpful if I'm able to identify the issue.</p> <p>I've googled about the issue and found that there's a NetworkLocationService which is possibly doing the Location lookup for Network Provider but I don't know the way I can check if it's hitting the right Google Location Server's URL or not or what's the response from the servers in case it's getting.</p> <p>I tried to inspect the log and there's something which I think might be the root of problem.</p> <p>Below is the log :</p> <blockquote> <pre><code> 01-02 19:17:06.790: I/ONCRPC(109): oncrpc_proxy_handle_cmd_rpc_call: Dispatching xid: 6b6 01-02 19:17:06.790: I/ONCRPC(109): oncrpc_xdr_reply_msg_start: Prog: 00000000, Ver: 00000000, Proc: 00000000 Xid: 000006b6 01-02 19:17:06.790: I/ONCRPC(109): oncrpc_msg_reply: Prog: 00000000, Ver: 00000000, Proc: 00000000 Xid: 000006b6 01-02 19:17:06.790: I/ONCRPC(109): oncrpc_proxy_handle_cmd_rpc_call: Dispatch returned for xid: 6b6 </code></pre> </blockquote>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload