Closed jayvardhanc closed 5 years ago
Could be as simple as turning on the GPS on your phone, since it says "Location not yet established". I know I've done that mistake a couple times.
I made sure that the GPS is on and also gave it enough time to get an accurate location reading. Now logcat displays 10-22 15:34:37.809 28680-28818/com.google.ar.sceneform.samples.hellosceneform W/native: localization_manager.cc:388 Map tracking detected failure condition that despite good tracking metrics gravity check failed. Reporting corrupted state.
looks to me that the cordinate you have given for andy is wrong and google maps failed to locate that position..
verify that cordinates
Co-ordinates are fine. Checked the co-ordinates on google maps. Do I need to write separate code to get the device location?
I have same problem on version 1.0.5 everything working but when i upragde to never i have repeated "LocationScene: Location not yet established." Edit: It only happends on Android 10 on Android 9.0 working fine
The application runs without any errors. But I cannot see the marker placed at the desired location. The Logcat repeatedly display this message: 10-11 12:52:48.177 10853-10853/com.google.ar.sceneform.samples.hellosceneform I/LocationScene: Refreshing anchors... 10-11 12:52:48.178 10853-10853/com.google.ar.sceneform.samples.hellosceneform I/LocationScene: Location not yet established.
Is there any mistake in code?
Code:
public class HelloSceneformActivity extends AppCompatActivity { private static final String TAG = HelloSceneformActivity.class.getSimpleName(); private static final double MIN_OPENGL_VERSION = 3.0;
private ArFragment arFragment; private ModelRenderable andyRenderable; private LocationScene locationScene;
@Override @SuppressWarnings({"AndroidApiChecker", "FutureReturnValueIgnored"}) // CompletableFuture requires api level 24 // FutureReturnValueIgnored is not valid protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
}
private Node getAndy(){ Node base = new Node(); base.setRenderable(andyRenderable); Context c =this; base.setOnTapListener((v, event) -> { Toast.makeText( c, "Andy touched.", Toast.LENGTH_LONG) .show(); }); return base; }
public static boolean checkIsSupportedDeviceOrFinish(final Activity activity) { if (Build.VERSION.SDK_INT < VERSION_CODES.N) { Log.e(TAG, "Sceneform requires Android N or later"); Toast.makeText(activity, "Sceneform requires Android N or later", Toast.LENGTH_LONG).show(); activity.finish(); return false; } String openGlVersionString = ((ActivityManager) activity.getSystemService(Context.ACTIVITY_SERVICE)) .getDeviceConfigurationInfo() .getGlEsVersion(); if (Double.parseDouble(openGlVersionString) < MIN_OPENGL_VERSION) { Log.e(TAG, "Sceneform requires OpenGL ES 3.0 later"); Toast.makeText(activity, "Sceneform requires OpenGL ES 3.0 or later", Toast.LENGTH_LONG) .show(); activity.finish(); return false; } return true; } }