Start a new topic

Trying to find where you are

Trying to find where you are


Hi Team,

 

I have recently develeoped within the Wikitude sdk examples app.

I am trying to now move my code into my own app but after moving the assets folder into my app and having connected it to my ARchitectView element it says:

 

"Trying to find where you are" on the warning single when I start my AR app.

 

Does anyone know what causes this and whether I have missed a step in migrating the multiplepois example code into my own app.

Thanks!

The 'i' icon? "Trying to find where you are" means the app is waiting for location info. If it keeps showing that, it may be because your GPS is not open, or you're in house.
I have also the same problem.
I built my app in android studio but when i run the app it says Trying to find out where you are.

 

Hello Saeid,


This message is shown when your location can not be fetched as needed. The "i" icon Trying to find out where you are means the app is waiting for location info. If it keeps showing that, it may be because your GPS is not open or you are testing in house and sometimes that blocks/affects the signal.

Please make sure that you have the location services on for the sample app. The location service has to be authorized by the user (so you can check your phone settings for the app if the location service is enabled to the specific app). For the location handling and the correct set-up please check the set-up guide to make sure you have everything done correctly. And you can also check the implementation and documentation for the POIs samples.
Finally, this could also happen because of specific requirements that your device fail to complete. You could try our sample app with several phones and see if this is happening with other phones as well. The minimum requirements that a device should fulfill are:

  1. Compass
  2. GPS and/or networking positioning
  3. Accelerometer

Thanks

Eva

Hi

I am using the following codes in Android studio but still I have a problem of "trying to find out where you are" :

public class MainActivity extends AppCompatActivity {

private ArchitectView architectView;
private LocationManager locationManager;
private LocationListener locationListener;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);


this.architectView = (ArchitectView) this.findViewById(R.id.architectView);
final ArchitectStartupConfiguration config = new ArchitectStartupConfiguration();
config.setFeatures(ArchitectStartupConfiguration.Features.Geo); this.architectView.onCreate(config);


// Acquire a reference to the system Location Manager
LocationManager locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);

// Define a listener that responds to location updates
LocationListener locationListener = new LocationListener() {
@Override
public void onLocationChanged(Location location) {
// Called when a new location is found by the network location provider.

}

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

@Override
public void onProviderEnabled(String provider) {
}

@Override
public void onProviderDisabled(String provider) {
}
};

// Register the listener with the Location Manager to receive location updates
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
requestPermissions(new String[]{
Manifest.permission.ACCESS_FINE_LOCATION,Manifest.permission.ACCESS_COARSE_LOCATION,
Manifest.permission.INTERNET
},10);
return;
}
locationManager.requestLocationUpdates("gps", 0, 0, locationListener);
}

@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
switch (requestCode){
case 10:
if(grantResults.length>0&&grantResults[0]==PackageManager.PERMISSION_GRANTED)

return;

}
} @Override
protected void onResume(){
super.onResume();

architectView.onResume();
//LocationManager.onResume;
}

@Override
protected void onDestroy(){
super.onDestroy();

architectView.onDestroy();
}

@Override
protected void onPause(){

super.onPause();

architectView.onPause();
//locationProvider.onPause();
}


}

Hello Saeid,


Did you make sure to apply all the steps I posted in my previous post (and also make sure that your phone actually supports GeoLocation features)? Also, it is very important that you provide a location strategy since the Wikitude SDK does not provide one. Without this implementation, no POIs will be loaded. Please follow the guidelines explained here https://www.wikitude.com/external/doc/documentation/latest/android/setupguideandroidlocation.html#location.


Thanks

Eva

Login or Signup to post a comment