Start a new topic

Can't access onLocation Changed in Native

Can't access onLocation Changed in Native


Hello Haseeb,

I assume that you are talking about our Android JS SDK. You could try and experience with our sample POIs and see how they work and you could also have a look at the documentation here and see how to implement the locationChanged function. I hope this will help you but if you still experiencing problems please let me know.

Thanks

Actually I want to locate user with location updates in AR view. I need to properly pass latitude and longitude values. Please help @Override
public void onLocationChanged(Location loc) {
// IMPORTANT:
// use this method for informing the SDK about a location change by the user
// for simplicity not used in this example
int latitude = (int) (loc.getLatitude());
int longitude = (int) (loc.getLongitude());

Log.i("Geo_Location", "Latitude: " + latitude + ", Longitude: " + longitude);
//inform ArchitectView about location changes
// if(this.architectView != null){
Toast.makeText(this, "Moving!!", Toast.LENGTH_LONG).show();
this.architectView.setLocation((float)(loc.getLatitude()), (float)(loc.getLongitude()), loc.getAccuracy());
// }
}

@Override
public void onProviderDisabled(String provider) {
// TODO Auto-generated method stub

}

@Override
public void onProviderEnabled(String provider) {
// TODO Auto-generated method stub

}

@Override
public void onStatusChanged(String provider, int status, Bundle extras) {
// TODO Auto-generated method stub

}


}


 
Login or Signup to post a comment