Tazaf / ionicitude

AngularJS module for using the Wikitude cordova plugin in an Ionic project.
http://tazaf.github.io/ionicitude/
MIT License
24 stars 10 forks source link

Reopen Ar-world after hide #11

Open FredrikHa opened 7 years ago

FredrikHa commented 7 years ago

It's me again! After calling 'Ionicitude.hide();', it won't open the Ar-world. This is only happening on Android.

Ionicitude.init()
  .then(function () {
    Ionicitude.addAction(close);
  })
  .catch(function (error) {
  });
  function close() {
    Ionicitude.hide();
  }
});

When I run the command 'launcAr('world')' this is the console in android studio: D/ViewRootImpl: ViewPostImeInputStage processPointer 0 D/ViewRootImpl: ViewPostImeInputStage processPointer 1 I/chromium: [INFO:CONSOLE(340)] "launch", source: file:///android_asset/www/lib/ionicitude/dist/ionicitude.js (340)

First launch is running perfectly!

Tazaf commented 7 years ago

Well... That's an interesting one. I'm going to have to run some tests but I won't be able to help you on this one for a few days: I'm on vacation, away from my work computer.

Anyway, normally, to "relaunch" a previously hidden world, you should call Ionicitude.show() rather than lauching it again.

FredrikHa commented 7 years ago

Did you understand this issue? I also have an issue with the Ionicitude.close() function. It does not respond.

Ionicitude.hide() works!

Console says so:

2016-10-19 13:25:12.957826 LEVENT[20190:5972772] architectsdk://close [object Object]
2016-10-19 13:25:12.957877 LEVENT[20190:5972772] Error in Success callbackId: WikitudePlugin1532793119 : Function required as first argument!
Giusti commented 7 years ago

I have the same issues when using Ionicitude.close() I get "Function required as first argument!" at file: lib/ionic/js/ionic.bundle.js (26794) and when I call show() after hide() nothing happens

Tazaf commented 7 years ago

Hi!

Could you give me a little more detail regarding the context of your Ionicitude.close() call?

This method of the service does nothing more than calling the Wikitude's native close() function. So in all honesty, I have no idea what's causing this issue ^^ Especially with an error message like the one you have, since close() doesn't require any argument.

Giusti commented 7 years ago

Mh not really funny thing is when I call WikitudePlugin.close() it works not sure whats the problem here

Tazaf commented 7 years ago

Do you call Ionicitude.close () inside an action, like this?

Ionicitude.addAction (myAction);

function myAction () {
  Ionicitude.close ();
}

If it's the case, try using the service argument instead, that is passed to an action when it is called:

Ionicitude.addAction (myAction);

function myAction (service) {
  service.close ();
}
Giusti commented 7 years ago

Gonna try it on monday thank You very much

Giusti commented 7 years ago

Did You already Experiment with the wikitude Plugin API?

Tazaf commented 7 years ago

Hum... not sure to understand what you mean by that.