2

I have an Ionic application. I would like it to have Augmented Reality capability. When the user presses a button, I would like to launch the Unity app I made with Vuforia. How might I do this?

My problem is very similar to this one : http://answers.unity3d.com/questions/1223790/integration-with-ionic-framework.html

But there is no clear solution. I thought stackoverflow would help me reach out to more people.

I have tried to follow the latest reply by the user "shawww" to no avail. I couldn't figure out what to copy, where to copy.

Is there a better/easier solution to this? Does anyone have any experience? A step-by-step guide maybe?

Thank you in advance.

nerdkan
  • 43
  • 1
  • 5

1 Answers1

0

Have you seen this : http://www.gajotres.net/how-to-launch-external-application-with-ionic-framework/

var scheme;

if(device.platform === 'iOS') {
    scheme = 'twitter://';
}
else if(device.platform === 'Android') {
    scheme = 'com.twitter.android';
}

You just need to replace

scheme = 'com.twitter.android';

to

scheme='com.yourpackage.name'

MeteHan
  • 289
  • 2
  • 16
  • Thank you for the answer. I would like to avoid having two separate applications if possible. I'm looking for a way to "embed" Unity within Ionic app. Why would I go this way? Not my choice, work is work :) If all else fails though, I will consider this. – nerdkan Feb 01 '17 at 14:37
  • Okay i misunderstood you. Did you follow these steps? https://nevzatarman.com/2015/01/04/unity-android-tutorial-opening-unity-scene-from-an-activity/ – MeteHan Feb 01 '17 at 18:12
  • Unfortunately, I couldn't. I have tried to follow his latest solution though. The one which was posted 2 days ago. – nerdkan Feb 02 '17 at 06:34
  • Did you ever find a solution? There are some native approaches (iOS: https://the-nerd.be/2015/11/13/integrate-unity-5-in-a-native-ios-app-with-xcode-7/ & Android: http://stackoverflow.com/questions/30579712/android-embedding-unity3d-scene-in-activity-need-to-unregister-receiver). And there is also an ionic plugin (https://github.com/shawticus/cordova2unity), but there isn't a clear answer to how to get BACK to Ionic after Unity is launched other than mentioned in the Native approaches above. – kfblake Apr 25 '17 at 21:48