- Home /
handling android deep links on unity apps
Hi all, I have an android app that is designed to respond to a deep link URL (e.g. myapp://xx/yyy). I already have all the necessary stuff in my android manifest, as soon as I hit a myapp:// link in a browser, it opens my unity app. The problem is that I actually need to process the URL contents by a native plugin, as soon as the app is opened by the URL. I don't know where to put that call. Here's why:
Using OnApplicationPause(false) is not a good place to make the call, as it mimics onResume and in a native android app, you process deep links ONLY inside onCreate of the main activity. You must NOT process them during onResume/onStart or else the URL gets processed over and over on any reopen after the initial click on the URL. So .
I also cannot override the default unity activity with some extra code in its onCreate, because it's being done for a customer that does not have access to the native side of the project - only to unity script, I cannot ask him to switch his default activity or make changes to it.
So basically I am looking for a place in the unity script that would have a similar lifecycle of onCreate and NOT of onResume. Does anyone know the correct place?
thanks
Hi i am facing problem in opening the unity app, i included the same manifest which works properly for an android app. but it is crashing every time. it is trying to open but it is crashing.