- Home /
Android app stuck opening url
I build a simple android app using unity & vuforia, i just want my app to redirect the user to a url from the browser when it detects the image target. It's working fine at the beginning, but after openning the url and coming back to the app, the app doesn't resume and is stuck on a black screen and keep redirecting me to the url. On the scene i just have the AR Camera with the basic Vuforia configuration(License+Activating the database), and an image target that has this C# script: using System.Collections; using System.Collections.Generic; using UnityEngine; using Vuforia;
public class QRTarget : MonoBehaviour, ITrackableEventHandler
{
private TrackableBehaviour mTrackableBehaviour;
void Start()
{
mTrackableBehaviour = GetComponent<TrackableBehaviour>();
if (mTrackableBehaviour)
{
mTrackableBehaviour.RegisterTrackableEventHandler(this);
}
}
public void OnTrackableStateChanged(TrackableBehaviour.Status previousStatus, TrackableBehaviour.Status newStatus)
{
if (newStatus == TrackableBehaviour.Status.DETECTED ||
newStatus == TrackableBehaviour.Status.TRACKED ||
newStatus == TrackableBehaviour.Status.EXTENDED_TRACKED)
{
Application.OpenURL("https://www.google.com");
}
}
}
What i want i to be able to come back to my app to scan other images for example, without being stuck on the redirection. Any help?
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
QR with Zxing and Vuforia 1 Answer
Distribute terrain in zones 3 Answers
Error with URL video for AR 0 Answers
Disable jumping more than once 4 Answers