•  


GitHub - the16bitgamer/Unity_Android_iOS_App_Detection: Unity Android and iOS Ability to Detect if a specific app has been installed
Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Unity Android and iOS Ability to Detect if a specific app has been installed

License

Notifications You must be signed in to change notification settings

the16bitgamer/Unity_Android_iOS_App_Detection

Repository files navigation

Unity Android and iOS App Detection Plugin

Unity Android and iOS Ability to Detect if a specific app has been installed

Download the Unity Package Here

Checking if an App is installed

To check if an app is installed first you need to initilize the app with

GetAppInfo appCheck = new GetAppInfo();

To Check if an app is installed call CheckInstalledApp(string APPID)

Android and iOS have different ways of checking if an Application is installed Follow the Guides bellow to make sure you have everything setup to check for the installed apps

Checking Android Apps

Due to recent changes with Android Permissions, how we check for apps installed on Android has been made more complicated. You need to request permission to query specific packages , or request permission to query all packages .

This is both a priviacy concern and out of scope for this project. So you will first need to download the Android Studio Project NetworkCheck which can be found here .

In the AppCheck project you will need to add the query as stated in the Android Documentation here

Build the AppCheck as an aar, and add it to your project in ./Assets/Plugins/Android

To Check for an Android App you will need to the Package Name for the app, i.e. com.android.Chrome for Google Chrome

Look at CheckInstalledApp.cs for an example of this

Checking iOS Apps

On iOS App checking is a lot more complicated since there is no Package Manager. So there is no way to check to see if an app is actually installed. But there is a workaround.

THIS WILL NOT WORK ON IOS 9 or LOWER

How the 16 Bit Unity App Detection on iOS works is by checking if there is an App installed which can open a specific web link.

The code for this is located in AppCheck.mm in ./Assets/Plugins/iOS

For example if you were to open a facebook link on Safari, Safari might open the Facebook app is it is installed.

So what you need to do is add the ability to open your app with a unique weblink which to my knowledge cannot be done in Unity but I could be wrong.

  1. Get the URL's for the Applications you want to search for or make up your own

    • We can add the ability to search for your app but you need to think for Unique URL's for your apps, i.e. MyCoolApp
    • For Third Party Apps try Google but I cannot guarentee if they would have them
  2. Add you checks to your code and build your App to Xcode

    • In Xcode we can add the attributes for the App Sensing
  3. Add The Following to your Info.plist

If you want your app to be detected add the Following

<key>CFBundleURLTypes</key>
<array>
  <dict>
	  <key>CFBundleURLSchemes</key>
		<array>
		  <string>INSERT_URL_WHICH_THE_APP_CAN_REACT_TO_HERE</string>
		</array>
		<key>CFBundleURLName</key>
		  <string>INSERT_APP_ID_HERE</string>
	</dict>
</array>

INSERT_URL_WHICH_THE_APP_CAN_REACT_TO_HERE can be anything like APP00 or MyCoolApp just so long as it would work as a url

INSERT_APP_ID_HERE is your application bundle ID I use com.CompanyName.${PRODUCT_NAME} for my apps

If you want to detect other apps

<key>LSApplicationQueriesSchemes</key>
    <array>
        <string>App00</string>
        <string>App01</string>
        <string>App(n-1)</string>
    </array>

Just change the App00 and so on to whatever you need to check for.

- "漢字路" 한글한자자동변환 서비스는 교육부 고전문헌국역지원사업의 지원으로 구축되었습니다.
- "漢字路" 한글한자자동변환 서비스는 전통문화연구회 "울산대학교한국어처리연구실 옥철영(IT융합전공)교수팀"에서 개발한 한글한자자동변환기를 바탕하여 지속적으로 공동 연구 개발하고 있는 서비스입니다.
- 현재 고유명사(인명, 지명등)을 비롯한 여러 변환오류가 있으며 이를 해결하고자 많은 연구 개발을 진행하고자 하고 있습니다. 이를 인지하시고 다른 곳에서 인용시 한자 변환 결과를 한번 더 검토하시고 사용해 주시기 바랍니다.
- 변환오류 및 건의,문의사항은 juntong@juntong.or.kr로 메일로 보내주시면 감사하겠습니다. .
Copyright ⓒ 2020 By '전통문화연구회(傳統文化硏究會)' All Rights reserved.
 한국   대만   중국   일본