Application.OpenUrl() alternative for Android build 2022,Open URL in Android App

Hello,

I’m trying to reward players for following my twitter/fb/youtube , I do this by sending them via my unity app on BtnClick to a link to the channels and reward them after 2minutes, so I don’t actually check if they followed my socials. This is working on PC but “Application.OpenURL()” does not work on Android, I found on the forum and in the docs Unity - Scripting API: Application.OpenURL that this is bc Android7.0 made using this impossible for security reasons.

I however can’t find an alternative anywhere, in the docs there is a mention of using FileProvider but I can’t find anywhere explained how to integrate and use this in my unity app. I only found half an explaination by someone implementing something for opening a file https://forum.unity.com/threads/application-openurl-on-unity-2017-2-android-7-not-working.502135/ but I am trying to open a link.

Can someone please help me with the current alternative for Application.Url( myUrlString ) on Android in 2022 with Unity because I searched the whole internet and am still stuck. I guess I have to use FileProvider but would like to find a complete explaination/tutorial (what to download, what codelines to add where, how to call) because I can’t find anythind helpful anywhere

Kind regards

The OpenURL method runs with the same permissions as your app itself. For example, if your app is running as a WebGL player in a desktop web browser, it will not be able to access local files on the machine, because the WebGL platform itself runs inside a security sandbox which prevents that. If you are targeting other platforms such as standalone EXE app, your app runs with fewer security restrictions and no security sandbox, so this method is more powerful.

greatpeople