Start a new topic
Solved

How to use custom camera plugin

Hi, I want to ask how to use custom camera plugin, i recently using the object and scene recoginiton and i want to combine it using the custom camera plugin. I'm already finished with the object and scene recoginition, and now i want to add custom camera pluggin for the effect while using the app. And Im using android javascript api.

dfsf.jpg
(75.7 KB)

Hi,


If you have a look at our sample application, in the custom camera plugin we are already combining image tracking and the actual custom camera plugin. We have a separate

ArchitectViewExtensionActivity that extends from the SimpleArActivity which adds additional implementation in order to also load the plugin. In the end, the code you should be using in the onPostCreate method it the next:

architectView.registerNativePlugins("wikitudePlugins", "customcamera", new ErrorCallback() {
    @Override
    public void onError(@NonNull WikitudeError error) {
        Toast.makeText(activity, R.string.error_loading_plugins, Toast.LENGTH_SHORT).show();
        Log.e(TAG, "Plugin failed to load. Reason: " + error.getMessage());
    }
});

This piece of code can be found in the CustomCameraExtension class and is the one loading the custom camera plugin. With that you should be able to reproduce the same effect as our sample app.


Best regards,

Aitor.

Hi this is Palak.

I have also confusion on this. Hope given solution from @Aitor will work.


Thanks 

Login or Signup to post a comment