Im currently developing a unity application for both android and ios platforms. I have implemented deep links in the platforms separately using native coding. The problem I have now is the deep linking works perfectly well in both android and ios devices if the app is starting the activity for the first time without it being resumed from the recent history. If the app was minimise and then if a deep link was clicked on the web page the app simply resumes but does not pass the deep link data. I know that this is because I have called the deep linking methods in void Start()
method. I tried to get boolean values to check for data from the activity and reload the deep linking part within the void Update()
method. But It does not work.
I tried google for hours for a solution. The only option left is to restart the app if its been resumed so that the whole thing will run from the beginning and therefore the deep linking will work in it.
I tried adding 'Application does not run in background' property in info.plist for ios.It worked but I cannot do that for android.
Im using unity 5.3.1f1 on mac and the function void OnApplicationPause
void OnApplicationFocus
both does not work on it. I manually debugged the code and it does not call the function.
If anyone could let me know if there is a method in unity or android where I can acheive what Im trying it would be a really big help. Thank you