Open jinesh08 opened 6 years ago
What are these “few phones”? Which manufacturers, which Android versions?
Apart from that, how do you create and use the instance of this library? Can you show the code?
// instance of this library
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View rootView= inflater.inflate(R.layout.fragment_dispatch, container, false);
location = new SimpleLocation(getActivity());
location.setListener(new SimpleLocation.Listener() {
@Override
public void onPositionChanged() {
}
});
bindViews(rootView);
return rootView;
}
//then just called location.getLatitude(); and location.getLongitude() in few methods
//phones in which this code is not working moto e4 plus android 7.1.1 Jio lyf phone android 6.0.1 MI redmi note 4
on other phones same code is working
pls help
location.hasLocationEnabled()
?location.beginUpdates();
.location.endUpdates();
.)onPositionChanged
callback method.Otherwise, can you move the instance and its creation to the parent Activity
and then follow the README?
In many phones its working perfect but in few phones lag lng is zero all the time. any solution?