Native Android Receive Text from Other Apps in Unity

This post was originally posted at https://agrawalsuneet.github.io/blogs/native-android-receive-text-from-other-apps-in-unity/ and reposted on Medium on 03rd Dec 2021.

Register Intent Filter in Manifest file

<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.agrawalsuneet.unitysharingclient" xmlns:tools="http://schemas.android.com/tools" android:installLocation="preferExternal">  <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />  <application android:theme="@style/UnityThemeSelector" android:icon="@mipmap/app_icon" android:label="@string/app_name" android:isGame="true" android:banner="@drawable/app_banner">    <activity android:name="com.unity3d.player.UnityPlayerActivity" android:label="@string/app_name" android:screenOrientation="fullSensor" android:launchMode="singleTask" android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale|layoutDirection|density" android:hardwareAccelerated="false">      <intent-filter>        <action android:name="android.intent.action.MAIN" />        <category android:name="android.intent.category.LAUNCHER" />        <category android:name="android.intent.category.LEANBACK_LAUNCHER" />      </intent-filter>      <meta-data android:name="unityplayer.UnityActivity" android:value="true" />    </activity>    <meta-data android:name="unity.build-id" android:value="d23ed252-3184-42bb-8dac-d4a3f9f6b02a" />    <meta-data android:name="unity.splash-mode" android:value="0" />    <meta-data android:name="unity.splash-enable" android:value="True" />  </application>  <uses-feature android:glEsVersion="0x00020000" />  <uses-permission android:name="android.permission.INTERNET" />  <uses-feature android:name="android.hardware.touchscreen" android:required="false" />  <uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="false" />  <uses-feature android:name="android.hardware.touchscreen.multitouch.distinct" android:required="false" /></manifest>

Please continue reading at https://agrawalsuneet.github.io/blogs/native-android-receive-text-from-other-apps-in-unity/

--

--

--

https://agrawalsuneet.github.io/

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Hands-on with Jetpack Compose

Android Activity Lifecycle considered harmful

Smart Alarm — Smart Logic Simulator Tutorial

AsyncTask is Deprecated !!??

Material Motion with MDC

KMM project shows “‘pod install’ command failed with code 1”. on Android Studio running on M1 chip

Dependency Injection in Android

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Suneet Agrawal

Suneet Agrawal

https://agrawalsuneet.github.io/

More from Medium

WearControl — A new way to play

Implementing Android 6.0 permissions in Unity3D

Android Ready Unity Project Build

A Basic Android Plug-in For Unity