Start a new topic

Wikitude SDK in Android Studio

Wikitude SDK in Android Studio


hello,

sorry if this post was out of topic. i think you are already know how to user wikitude sdk in android studio, could you give me some advice / tutorial source from the very basic of building app with this sdk? since i already try with the sample project but it was too complicated and i already try with wikitude documentation but it doesnt go so well (i try POI as it says in documentation but it wont show anything, just blank screen + watermark).

thanks!

Hi,

From your description it sounds like you were able to successfully build the project and run it on the device - so it sounds like the set-up with Android Studio went fine. Are you running the sample app wihout any changes, or did you change something in the code.

As you're working with the POI samples, please make sure that your test devices has all the required components like mentioned here.

Greetings

Nicola

Hi Nicola,

My test device has all required components that was mentioned at sdk's documentations. Note that i dont use exampleproject that provided inside sdk.rar, because i can't build it inside android studio. I just create new project and follow the instructions until i got the result as shown below (just show black screen and watermarks). Hope you can help me solve this, thanks.

Best Regards,

Imaduddin

Hi,

This looks like the AR experience is not loaded properly. Please have a futher look at the set-up and how to load the AR experience properly in the Android documentation.

Greetings

Nicola

Hi Nicola,

I just following this guides http://www.wikitude.com/external/doc/documentation/latest/android/setupguideandroid.html#setup-guide-android

If i follow that guides, should it at least show the camera? but what i got is blank/black screen as if the camera was not loaded. Here's the activity's code (inside onCreate):

//
this.architectView = (ArchitectView)this.findViewById( R.id.architectView );
final StartupConfiguration config = new StartupConfiguration("Iw8dgcv2QvottDemMQz/Fib3sCFGQrU1bkechTUI8UTbhI7J8w9i917VleINyx+2n3pBY7ChAPoDLW9F3jYYdNuKkVmhtqxdTvGpiI0MDOfa0zBLo1jRUdf1s1nSS15EdM7AmALfwG2V+c5yPbcGjfqHoyMTegN259UB3ax5matTYWx0ZWRfX52y/poCEJViU9eGGiuH2Z5qLqpp9I5h3eJMlKIpRFnSKG4cNzt9z+deq7vyQEeLEa8im0eyzVqpKZJmKX0IL8jl+eZ+CjxCuRH5o5eH2N/hDH4UD3Xa20arZ9W86G89xUPpBGtDi7AEm8AWhhGIzrcETMmuroOZlHmC8G6AjulXE2cEOssoJsyBEMUHGi4kDPGUj4fbnLjhRQ3IjQYiZDar6Y4tKAFu2KgCi5O//6/IAiFkeZT+SqCW5tH6gwzd7goS/1Q/e1hZIhbj5f65s7LWmDOAN0jcDv/e6oeR2bG1vfgZDc1mygQb7HoQOYisQGcEeqw5daZRa1VjHZypX831NGBnIa8esSF014HvBy0ScmQgxLESeop7WQRIDQpDCJy770do0fmjkbKDaOQ0Zg5Q0y8hx2oYVD7ctw8bJU2E3zUA8uZhOvOIgwvP8H7oJuVvU+s8wE4yGe3GPJfGRWZHeem9i5Hfj1+NrO/HwmKTYO3K2ACs3eE=");
this.architectView.onCreate(config);
//
this.architectView.onPostCreate();
try {
this.architectView.load("index.html");
} catch (IOException e) {
e.printStackTrace();
}

Hope you could help me find the problem, thanks

Best Regards,

Imaduddin

Hi,

The architectView.load() argument is the path to the html file that defines your AR experience. It can be relative to the asset folder root or a web-url (starting with http:// or https://). e.g. architectView.load('arexperience.html') opens the html in your project's assets-folder, whereat architectView.load('http://your-server.com/arexperience.html') loads the file from a server.

So please make sure that the path is entered corretly.

Greetings

Nicola

Hi Nicola,

Here's the folder stucture of my project and the running apps. I think the html file was loaded but i don't know if it was loaded properly or not and it doesn't show camera image. Is there something that i must do?

Best Regards,

Imaduddin

Hi i seem to believe this topic might have been treated somewhere here but i am unable to locate it. 
I have tried for over a week to configure Wikitude's SDK within my Android Studio project all to no avail. I chose the first sample - imageontarget, and moved the files like so.

res ->
    assets ->
          wiki ->
               assets ->
                    imageOne.png
                    magazine.wtc
                    surfer.png
               css ->
                    default.css
               js ->
                    imageontarget.js
               index.html
               ade.js

I suspect its the link between default index.html file, the javascript file and the wikitude jar file. After running the sample, using chrome device inspector, i keep getting the error - "Uncaught ReferenceError: AR is not defined (repeated 2 times)". I wonder if someone could help with the exact steps to take to integrate the files within Android Studio. Thanks.

Gladly I have been able to solve this. 
The problem had to do with the difference in strategy of accessing the asset folder between Eclipse and Android Studio. I found the solution at this link - http://bit.ly/1HiFOiK

Thanks.
Login or Signup to post a comment