Start a new topic

Crash when back from background (iOS)

Crash when back from background (iOS)


iOS 7.1, Phonegap 3.4 & xCode 5.1

Open the application in AR View, click Home button, the application goes to background mode, re-active the app from the task list. App Crashed.

Any ideas?

Hi,

First, I solved the crash problem when re-active from background mode.

Need to add the following.
document.addEventListener("pause", this.onDevicePause, false);
document.addEventListener("resume", this.onDeviceResume, false);

Android
onDevicePause: function() { app.wikitudePlugin.close(); },

onDeviceResume: function() { // Do you code },

 

iOS


onDevicePause: function() { },

onDeviceResume: function() { app.wikitudePlugin.close();  // Do you code },

 


However, I find another problem. (I tested on iOS only)

If I have called app.wikitudePlugin.hide(); before going to background mode, the application is no problem when re-active from background.

However, when I want to load the World again, world loaded successful, but camera screen is green.

 

Thanks.

OH! I find the solution.

If I hide the AR view before going to background mode, after the application reactived, no need to call "app.wikitudePlugin.close();" and reload the world, just call "app.wikitudePlugin.show();" is enough.

HAHA!

Thanks.

Hello Frederick,

Did you manage to make this work? If so would you advise me?

I too experience the same problem both in ios and android.

Thanks a lot.

-Lidya
Login or Signup to post a comment