Start a new topic

Plugin#cameraFrameAvailable is not called when using InstantTracker with SMART enabled

Hi,


I am using a simple native plugin to be able to feed the camera frames back to my android activity (in order to be able to stream the video feed.


This all worked fine up until the point that I tried using InstantTracker. I'm testing on a Samsung S8 with ARCore installed so platform assisted tracking was enabled.

When I disabled SMART on my InstantTrackerConfiguration, it worked again as before.


Could you propose an alternative method to get the frames when SMART is enabled? Or can this be fixed in the next release (if so, will this take long?)


I've attached the plugin and this is my wikitude initialization code:


/**
* Initialize Wikitude AR Tracking
*/
private void initWikitude() {
wikitudeSDK = new WikitudeSDK(this);
NativeStartupConfiguration startupConfiguration = new NativeStartupConfiguration();
startupConfiguration.setLicenseKey(WikitudeSDKConstants.WIKITUDE_SDK_KEY);
startupConfiguration.setCameraPosition(CameraSettings.CameraPosition.BACK);
startupConfiguration.setCameraResolution(CameraSettings.CameraResolution.HD_1280x720);
startupConfiguration.setCameraFocusMode(CameraSettings.CameraFocusMode.CONTINUOUS);

wikitudeSDK.onCreate(getApplicationContext(), this, startupConfiguration);

// if the device doesn't offer platform assisted tracking capabilities (ARCore) -> disable SMART
InstantTrackerConfiguration configuration = new InstantTrackerConfiguration();
// configuration.setSMARTEnabled(wikitudeSDK.getTrackerManager().isPlatformAssistedTrackingSupported());
configuration.setSMARTEnabled(false);
instantTracker = wikitudeSDK.getTrackerManager().createInstantTracker(this, configuration);

// register Plugin in the wikitude SDK and in the jniRegistration.cpp
wikitudeSDK.getPluginManager().registerNativePlugins("wikitudePlugins", "wikitude_frame_plugin", new PluginManager.PluginErrorCallback() {
@Override
public void onRegisterError(int errorCode, String errorMessage) {
Log.v(LOG_TAG, "Plugin failed to load. Reason: " + errorMessage);
}
});

// sets this activity in the plugin
initNative();
}
h
(708 Bytes)
cpp

Hi Yannick,


you can download the beta of SDK 8.0 from https://www.wikitude.com/download/ in the "Beta" tab.


Best Regards,

Alex

HiYannick,


this issue will be fixed in the next version of the SDK. Unfortunately i can not give you a date on when it will be released yet.


Best Regards,

Alex

Ok, thanks for your feedback.
Could you provide at least a rough estimate for the new version?

We would be interested to get a one-time fee license for our app, so it would be great to have a version with this issue fixed.

Hi Yannick,


we are aware of an issue when using SDK 7.2.1 when the ARCore app with version 1.0 or higher is installed on the device. This will be fixed with the SDK 8.0 release. 

There are some changes in how to make ARCore work with the SDK that are described in the migration guide.

All of this is already included in the SDK 8.0 Beta.


Best Regards,

Alex

Hi, a while back I tried the beta version, but I didn't get it to work.

There were quite some incompatibilities with my current code.

So I've gone with another approach which eliminates the need for a native plugin.

I can enable SMART now, but I'm getting an error:

W/AnchorServiceClientFactory: The API key for use with the Google AR service could not be obtained!
E/bbd: *~*~*~ Channel {0} was not shutdown properly!!! ~*~*~*
                                                                                  Make sure to call shutdown()/shutdownNow() and wait until awaitTermination() returns true.
                                                                              java.lang.RuntimeException: ManagedChannel allocation site
                                                                                  at bbe.<init>(PG:4)
                                                                                  at bbd.<init>(PG:4)
                                                                                  at bbd.<init>(PG:1)
                                                                                  at aui.a(PG:63)
                                                                                  at com.google.ar.persistence.AnchorServiceClientFactory.create(PG:17)
                                                                                  at com.google.ar.core.Session.nativeCreateSession(Native Method)
                                                                                  at com.google.ar.core.Session.<init>(Unknown Source:22)
                                                                                  at com.wikitude.common.services.arcore.internal.c.a(Unknown Source:10)
                                                                                  at com.wikitude.tracker.internal.TrackerManagerInternal.isPlatformAssistedTrackingSupported(Unknown Source:4)
                                                                                  at io.s2.passerelle.remotesupport.app.android.activity.StreamActivity.initWikitudeInstantTracking(StreamActivity.java:835)
                                                                                  at io.s2.passerelle.remotesupport.app.android.activity.StreamActivity.onStreamReceived(StreamActivity.java:1446)
                                                                                  at com.opentok.android.Session.onStreamReceived(Session.java:1509)
                                                                                  at com.opentok.android.Session$8.run(Session.java:1490)
                                                                                  at android.os.Handler.handleCallback(Handler.java:789)
                                                                                  at android.os.Handler.dispatchMessage(Handler.java:98)
                                                                                  at android.os.Looper.loop(Looper.java:164)
                                                                                  at android.app.ActivityThread.main(ActivityThread.java:6938)
                                                                                  at java.lang.reflect.Method.invoke(Native Method)
                                                                                  at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
                                                                                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

  How can we fix this? I didn't find much information about Google AR API keys




Login or Signup to post a comment