Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

Game Doesn't Install on Android 12 from Playstore

Discussion in 'Android' started by instruct9r, Jan 8, 2022.

  1. instruct9r

    instruct9r

    Joined:
    Aug 1, 2012
    Posts:
    148
    Hello.

    We have recently released our game to the Playstore and i found out (From coments) that people running Android 12 can't install the game. The game has more than 2k installs on other devices running Android 11 or earlier.

    The message that the users get is: "Can't Install"
    "Try again, and if it still doesn't work, see common ways to fix the problem"

    Does anyone experience similar problem? The game was build with Unity 2019...
     
  2. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,800
    Edit:

    Most likely the issue is not having exported flag for the unity activity which is a requirement from Android 12. This can be solved by updating your unity to latest version.

    If you can't update or if unity hasn't back-ported to 2019, you can try the below script.
    Note that this is picked from our plugin Cross Platform Native Plugins : Essential Kit and adapted to avoid any compilation errors.

    Code (CSharp):
    1. //Taken from Cross Platform Native Plugins : Essential Kit (http://u3d.as/1szE)
    2. #if UNITY_EDITOR && UNITY_ANDROID
    3. using System.IO;
    4. using System.Text;
    5. using System.Xml;
    6. using UnityEditor.Android;
    7.  
    8. //Reference : https://github.com/Over17/UnityAndroidManifestCallback
    9. namespace VoxelBusters.EssentialKit.Editor.Android
    10. {
    11.     public class AndroidManifestPostProcessor : IPostGenerateGradleAndroidProject
    12.     {
    13.         public void OnPostGenerateGradleAndroidProject(string basePath)
    14.         {
    15.             AndroidManifest androidManifest = new AndroidManifest(GetManifestPath(basePath));
    16.  
    17.             //For forcing android hardwareAccelerated flag
    18.             //(Comment the hardwareAccelerated lines if you really don't care. We use it for our Webview feature for rendering videos in webview)
    19.             androidManifest.SetApplicationAttribute("hardwareAccelerated", "true");
    20.             androidManifest.SetStartingActivityAttribute("hardwareAccelerated", "true");
    21.  
    22.             //For forcing debuggable flag
    23.             androidManifest.SetApplicationAttribute("debuggable", UnityEditor.EditorUserBuildSettings.development ? "true" : "false");
    24.  
    25.             // For API 31+ support (Need explicit exported flag for entries having intent-filter tags)
    26.             androidManifest.SetStartingActivityAttribute("exported", "true");
    27.  
    28.             androidManifest.Save();
    29.         }
    30.  
    31.         public int callbackOrder { get { return 1; } }
    32.  
    33.         private string _manifestFilePath;
    34.  
    35.         private string GetManifestPath(string basePath)
    36.         {
    37.             if (string.IsNullOrEmpty(_manifestFilePath))
    38.             {
    39.                 StringBuilder pathBuilder = new StringBuilder(basePath);
    40.                 pathBuilder.Append(Path.DirectorySeparatorChar).Append("src");
    41.                 pathBuilder.Append(Path.DirectorySeparatorChar).Append("main");
    42.                 pathBuilder.Append(Path.DirectorySeparatorChar).Append("AndroidManifest.xml");
    43.                 _manifestFilePath = pathBuilder.ToString();
    44.             }
    45.             return _manifestFilePath;
    46.         }
    47.     }
    48.  
    49.  
    50.     internal class AndroidXmlDocument : XmlDocument
    51.     {
    52.         private string m_Path;
    53.         protected XmlNamespaceManager nsMgr;
    54.         public readonly string AndroidXmlNamespace = "http://schemas.android.com/apk/res/android";
    55.         public AndroidXmlDocument(string path)
    56.         {
    57.             m_Path = path;
    58.             using (var reader = new XmlTextReader(m_Path))
    59.             {
    60.                 reader.Read();
    61.                 Load(reader);
    62.             }
    63.             nsMgr = new XmlNamespaceManager(NameTable);
    64.             nsMgr.AddNamespace("android", AndroidXmlNamespace);
    65.         }
    66.  
    67.         public string Save()
    68.         {
    69.             return SaveAs(m_Path);
    70.         }
    71.  
    72.         public string SaveAs(string path)
    73.         {
    74.             using (var writer = new XmlTextWriter(path, new UTF8Encoding(false)))
    75.             {
    76.                 writer.Formatting = Formatting.Indented;
    77.                 Save(writer);
    78.             }
    79.             return path;
    80.         }
    81.     }
    82.  
    83.  
    84.     internal class AndroidManifest : AndroidXmlDocument
    85.     {
    86.         private readonly XmlElement ApplicationElement;
    87.  
    88.         public AndroidManifest(string path) : base(path)
    89.         {
    90.             ApplicationElement = SelectSingleNode("/manifest/application") as XmlElement;
    91.         }
    92.  
    93.         private XmlAttribute CreateAndroidAttribute(string key, string value)
    94.         {
    95.             XmlAttribute attr = CreateAttribute("android", key, AndroidXmlNamespace);
    96.             attr.Value = value;
    97.             return attr;
    98.         }
    99.  
    100.         internal XmlNode GetActivityWithLaunchIntent()
    101.         {
    102.             return SelectSingleNode("/manifest/application/activity[intent-filter/action/@android:name='android.intent.action.MAIN' and " +
    103.                     "intent-filter/category/@android:name='android.intent.category.LAUNCHER']", nsMgr);
    104.         }
    105.  
    106.         internal void SetApplicationTheme(string appTheme)
    107.         {
    108.             ApplicationElement.Attributes.Append(CreateAndroidAttribute("theme", appTheme));
    109.         }
    110.  
    111.         internal void SetStartingActivityName(string activityName)
    112.         {
    113.             GetActivityWithLaunchIntent().Attributes.Append(CreateAndroidAttribute("name", activityName));
    114.         }
    115.  
    116.         internal void SetApplicationAttribute(string key, string value)
    117.         {
    118.             ApplicationElement.Attributes.Append(CreateAndroidAttribute(key, value));
    119.         }
    120.  
    121.         internal void SetStartingActivityAttribute(string key, string value)
    122.         {
    123.             XmlNode node = GetActivityWithLaunchIntent();
    124.             if(node != null)
    125.             {
    126.                 XmlAttributeCollection  attributes = node.Attributes;
    127.                 attributes.Append(CreateAndroidAttribute(key, value));
    128.             }
    129.         }
    130.     }
    131. }
    132. #endif
    133.  
    How to use?
    1. Copy the contents of the share code into AndroidManifestPostProcessor.cs file
    2. Place it under your Assets/Editor folder. (this is folder of your unity project)
     
    Last edited: Jan 18, 2022
    RiverHu, steril, Issun and 9 others like this.
  3. MariusAAnghel00

    MariusAAnghel00

    Joined:
    Jan 18, 2021
    Posts:
    8
    Hi!

    I've updated to 2020.3.25.f1 and I still have get the error when I try to update one existing app: "You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without 'android:exported' property set. This file can't be installed on Android 12 or higher. See: developer.android.com/about/versions/12/behavior-changes-12#exported"

    Also, I've selected "Custom Main Manifest" (Project Settings > Player > Android > Publishing Settings > Build), and added android:exported="false" (one time) and android:exported="true" (another time) in AndroidManifest.xml, but still same error. Tried this with 2020.3.25.f1 and 2019.4.28f1.


    I want to try your method, but I'm not very advanced... From my undestanding you said to create a c# file and to add the code you posted? if yes, then where exactly that file need to be placed?

    Thank you!



     
    Last edited: Jan 18, 2022
  4. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,800
    1. Copy the contents of the share code into AndroidManifestPostProcessor.cs file
    2. Place it under your Assets/Editor folder. (this is folder of your unity project)
     
    MariusAAnghel00 likes this.
  5. LummosStudos

    LummosStudos

    Joined:
    Feb 28, 2021
    Posts:
    1
    Thanks for the code but it throws compilation errors on anything referencing "EssentialKit", starting with
    namespace VoxelBusters.EssentialKit.Editor.Android. Is there a way to fix this ?
     
  6. unity_0xBtYlRLY0wp7Q

    unity_0xBtYlRLY0wp7Q

    Joined:
    Dec 12, 2021
    Posts:
    4

    Hello, thanks for your help, I followed the steps but I had these errors, any solution? I will be grateful.

    Assets\Editor\AndroidManifestPostProcessor.cs.cs(21,24): error CS0103: The name 'EssentialKitSettingsEditorUtility' does not exist in the current context

    Assets\Editor\AndroidManifestPostProcessor.cs.cs(15,13): error CS0246: The type or namespace name 'EssentialKitSettings' could not be found (are you missing a using directive or an assembly reference?)
     
  7. unity_0xBtYlRLY0wp7Q

    unity_0xBtYlRLY0wp7Q

    Joined:
    Dec 12, 2021
    Posts:
    4
    I think I have solved it.
    I deleted this part of the code that you shared:

    Code (CSharp):
    1.  
    2. EssentialKitSettings settings;
    3.              if (!EssentialKitSettingsEditorUtility.SettingsExists)
    4.              {
    5.                  return;
    6.              }
    7.              settings = EssentialKitSettingsEditorUtility.DefaultSettings;
    8.  
    No problem to build, and I was able to update my application.
    Do you think I have a problem with the way I edit the code?
    Thanks for your help.
     
    Voxel-Busters likes this.
  8. imbruceter

    imbruceter

    Joined:
    May 20, 2020
    Posts:
    9
    It doesn't really matter since the bundle still cannot be published for the same reason.
    I tested.
     
  9. unity_0xBtYlRLY0wp7Q

    unity_0xBtYlRLY0wp7Q

    Joined:
    Dec 12, 2021
    Posts:
    4
    Your problem must be different from mine because I can publish my app by editing the code in the way I explained before.
     
  10. imbruceter

    imbruceter

    Joined:
    May 20, 2020
    Posts:
    9
    Can you please explain me what exactly you did?
    My issue is that if I try to upload my app bundle to the Play Store, I get this error:
    "You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without 'android:exported' property set. This file can't be installed on Android 12 or higher."


    I tried to insert android:exported="true" into AndroidManifest.xml but it didn't solve the issue.
    I tried to insert the code above (deleted the part you also deleted) into the Assets > Editor subfolder, but it didn't solve the issue.

    What the hell am I supposed to do?
     
  11. unity_0xBtYlRLY0wp7Q

    unity_0xBtYlRLY0wp7Q

    Joined:
    Dec 12, 2021
    Posts:
    4
    go to assets/editor and create a script AndroidManifestPostProcessor.cs paste this:

    Code (CSharp):
    1. //Taken from Cross Platform Native Plugins : Essential Kit (http://u3d.as/1szE)
    2. #if UNITY_EDITOR && UNITY_ANDROID
    3. using System.IO;
    4. using System.Text;
    5. using System.Xml;
    6. using UnityEditor.Android;
    7.  
    8. //Reference : https://github.com/Over17/UnityAndroidManifestCallback
    9. namespace VoxelBusters.EssentialKit.Editor.Android
    10. {
    11.     public class AndroidManifestPostProcessor : IPostGenerateGradleAndroidProject
    12.     {
    13.         public void OnPostGenerateGradleAndroidProject(string basePath)
    14.         {
    15.             AndroidManifest androidManifest = new AndroidManifest(GetManifestPath(basePath));
    16.  
    17.             //For forcing android hardwareAccelerated flag
    18.             androidManifest.SetApplicationAttribute("hardwareAccelerated", "true");
    19.             androidManifest.SetStartingActivityAttribute("hardwareAccelerated", "true");
    20.  
    21.             //For forcing debuggable flag
    22.             androidManifest.SetApplicationAttribute("debuggable", UnityEditor.EditorUserBuildSettings.development ? "true" : "false");
    23.  
    24.             // For API 31+ support (Need explicit exported flag for entries having intent-filter tags)
    25.             androidManifest.SetStartingActivityAttribute("exported", "true");
    26.  
    27.             androidManifest.Save();
    28.         }
    29.  
    30.         public int callbackOrder { get { return 1; } }
    31.  
    32.         private string _manifestFilePath;
    33.  
    34.         private string GetManifestPath(string basePath)
    35.         {
    36.             if (string.IsNullOrEmpty(_manifestFilePath))
    37.             {
    38.                 StringBuilder pathBuilder = new StringBuilder(basePath);
    39.                 pathBuilder.Append(Path.DirectorySeparatorChar).Append("src");
    40.                 pathBuilder.Append(Path.DirectorySeparatorChar).Append("main");
    41.                 pathBuilder.Append(Path.DirectorySeparatorChar).Append("AndroidManifest.xml");
    42.                 _manifestFilePath = pathBuilder.ToString();
    43.             }
    44.             return _manifestFilePath;
    45.         }
    46.     }
    47.  
    48.  
    49.     internal class AndroidXmlDocument : XmlDocument
    50.     {
    51.         private string m_Path;
    52.         protected XmlNamespaceManager nsMgr;
    53.         public readonly string AndroidXmlNamespace = "http://schemas.android.com/apk/res/android";
    54.         public AndroidXmlDocument(string path)
    55.         {
    56.             m_Path = path;
    57.             using (var reader = new XmlTextReader(m_Path))
    58.             {
    59.                 reader.Read();
    60.                 Load(reader);
    61.             }
    62.             nsMgr = new XmlNamespaceManager(NameTable);
    63.             nsMgr.AddNamespace("android", AndroidXmlNamespace);
    64.         }
    65.  
    66.         public string Save()
    67.         {
    68.             return SaveAs(m_Path);
    69.         }
    70.  
    71.         public string SaveAs(string path)
    72.         {
    73.             using (var writer = new XmlTextWriter(path, new UTF8Encoding(false)))
    74.             {
    75.                 writer.Formatting = Formatting.Indented;
    76.                 Save(writer);
    77.             }
    78.             return path;
    79.         }
    80.     }
    81.  
    82.  
    83.     internal class AndroidManifest : AndroidXmlDocument
    84.     {
    85.         private readonly XmlElement ApplicationElement;
    86.  
    87.         public AndroidManifest(string path) : base(path)
    88.         {
    89.             ApplicationElement = SelectSingleNode("/manifest/application") as XmlElement;
    90.         }
    91.  
    92.         private XmlAttribute CreateAndroidAttribute(string key, string value)
    93.         {
    94.             XmlAttribute attr = CreateAttribute("android", key, AndroidXmlNamespace);
    95.             attr.Value = value;
    96.             return attr;
    97.         }
    98.  
    99.         internal XmlNode GetActivityWithLaunchIntent()
    100.         {
    101.             return SelectSingleNode("/manifest/application/activity[intent-filter/action/@android:name='android.intent.action.MAIN' and " +
    102.                     "intent-filter/category/@android:name='android.intent.category.LAUNCHER']", nsMgr);
    103.         }
    104.  
    105.         internal void SetApplicationTheme(string appTheme)
    106.         {
    107.             ApplicationElement.Attributes.Append(CreateAndroidAttribute("theme", appTheme));
    108.         }
    109.  
    110.         internal void SetStartingActivityName(string activityName)
    111.         {
    112.             GetActivityWithLaunchIntent().Attributes.Append(CreateAndroidAttribute("name", activityName));
    113.         }
    114.  
    115.         internal void SetApplicationAttribute(string key, string value)
    116.         {
    117.             ApplicationElement.Attributes.Append(CreateAndroidAttribute(key, value));
    118.         }
    119.  
    120.         internal void SetStartingActivityAttribute(string key, string value)
    121.         {
    122.             XmlNode node = GetActivityWithLaunchIntent();
    123.             if (node != null)
    124.             {
    125.                 XmlAttributeCollection attributes = node.Attributes;
    126.                 attributes.Append(CreateAndroidAttribute(key, value));
    127.             }
    128.         }
    129.     }
    130. }
    131. #endif
    132.  
    build new apk/aab and upload
     
  12. imbruceter

    imbruceter

    Joined:
    May 20, 2020
    Posts:
    9
    I did the same exact thing, no success. Can you share your AndroidManifest.xml file which is inside Assets > Plugin > Android?
    Maybe there is something inside which I might have wrong...
    Does your game use Google Play Services (achievements or leaderboard)?
     
  13. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,800
    Thanks for pointing the compilation error. I should have removed it earlier but was in rush :)
    Anyways, I removed those lines and it should be fine for anyone now.
     
  14. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,800
    Share me the a dummy apk (with no scenes added in the build settings) to have a look at it.
     
  15. guralp

    guralp

    Joined:
    Mar 18, 2016
    Posts:
    15
    I tried everything but unable to upload publish on Google Play.
    What I did?
    1- Update my unity version
    2- I added android:exported="true" in manifest
    3- I added your script in editor folder

    I didn't understand what I have to do ? Very annoying issue...
     
  16. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    10,828
    How are you all adding exported = "true"? It needs to be inside the activity tag.
     
  17. guralp

    guralp

    Joined:
    Mar 18, 2016
    Posts:
    15
    I added as attached.
     

    Attached Files:

    • 1.jpeg
      1.jpeg
      File size:
      68.4 KB
      Views:
      1,223
  18. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    10,828
    I don't think it's needed inside meta data, but the other one seems correct to me.
     
  19. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,800
    Problem is here
    Code (CSharp):
    1. <receiver android:name="com.unity.androidnotifications.UnityNotificationRestartOnBootReceiver" android:enabled="false">
    2.             <intent-filter>
    3.                 <action android:name="android.intent.action.BOOT_COMPLETED"/>
    4.             </intent-filter>
    5.         </receiver>

    Your mobile notifications need to have android:exported flag as its using intent-filter as per Android 12.
    Try checking if you see an update from that plugin. It should resolve it.
     
  20. guralp

    guralp

    Joined:
    Mar 18, 2016
    Posts:
    15
    Thank you very much. I removed Mobile Notifications package and it's fixed. I think this package coming as default. If you don't use you should remove that.
     
    Voxel-Busters likes this.
  21. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,800
    Yikes! I didn't expect that :eek:
     
  22. Gamrek

    Gamrek

    Joined:
    Sep 28, 2010
    Posts:
    164
    Hello

    I am having the same problem and used the script above, but doesn't solve this error. Can anyone confirm this is also a problem with 2021.3.26f1?
     
  23. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,800
    Share an empty apk or merged manifest file from build folder of Temp/gradleOut once you make an apk/aab.
     
  24. FrenchToastFella

    FrenchToastFella

    Joined:
    Dec 9, 2013
    Posts:
    7
    Hey guys! I think I'm having the same issue with Unity Mobile Notifications (UnityNotificationRestartOnBootReceive seems to be the culprit here) but we need mobile notifications! I have the latest version of that package currently (1.3.0) and we're using unity 2018.4... Is there a way to insert exported:true into that single event via postprocessor or anything else?
     
  25. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,800
    Check this post.
     
  26. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,800
    Doesn't look like its related to the issue we are talking about in this thread. Share the log details of the crash to explore more details.
     
  27. gabriel_marin_psious

    gabriel_marin_psious

    Joined:
    Dec 16, 2020
    Posts:
    1
    This is the message I get when trying to upload the apk/aab to the PlayStore:

    You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without 'android:exported' property set. This file can't be installed on Android 12 or higher. See: developer.android.com/about/versions/12/behavior-changes-12#exported
     
  28. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,800
    The manifest you shared seems to be proper though. I assume some data i missing mostly if you get that error.
    Pass me an empty APK (with all scenes disabled from build settings) to look into.
     
  29. akaashchep

    akaashchep

    Joined:
    Aug 7, 2018
    Posts:
    1
  30. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,800
  31. bart_the_13th

    bart_the_13th

    Joined:
    Jan 16, 2012
    Posts:
    485
    Hi, I used the script above using Unity 2019.2 and I finally able to submit the abb.
    But the app goes black screen after showing unity logo only on android 12, anyone encountered the same issue?
     
  32. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,800
    If its exported flag issue, you can't even install the apk on Android 12. Share complete logcat log.
     
  33. marcosmmars

    marcosmmars

    Joined:
    Mar 31, 2022
    Posts:
    1

    I did the same things you described here and Really it worked, You have saved a lot of my production time. thanks a lot man
     
    kingzustin and Voxel-Busters like this.
  34. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,800
    Glad its helpful :)
     
  35. CalaveraX

    CalaveraX

    Joined:
    Jul 11, 2013
    Posts:
    143
    Im having same issue with UTNotifications package, im adding the android:exported into the manifest file provided with the plugin, but for some reason a dont understand when the apk is built, this android:exported disapears from the merged androidmanifest file inside the apk
     
  36. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,800
    Strange.
    Did you try the script shared above? Thats added at the last step to make sure it exists. Let me know if it doesn't work for you. Also, recent unity versions (including LTS) already have the exported flag by now mostly.
     
  37. CalaveraX

    CalaveraX

    Joined:
    Jul 11, 2013
    Posts:
    143
    Hi there!
    Yeah i have added the script from above, but for some reason i have still the same issue, im leaving attached my final merged androidmanifest (Extracted from inside apk, as a txt file since unity forum dont allow me to upload xml files)

    On the android manifest file within the plugin i have modified to this

    <!-- Restore Scheduled Notifications On Reboot -->
    <receiver android:name="universal.tools.notifications.ScheduledNotificationsRestorer" android:exported="false">
    <intent-filter>
    <action android:name="android.intent.action.BOOT_COMPLETED" />
    </intent-filter>
    </receiver>

    but for some reason after building:


    <receiver android:name="universal.tools.notifications.ScheduledNotificationsRestorer">
    <intent-filter>
    <action android:name="android.intent.action.BOOT_COMPLETED"/>
    </intent-filter>
    </receiver>
     

    Attached Files:

  38. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,800
    Update your Facebook and vrcore plugins. They seem to miss the exported flag.
     
  39. CalaveraX

    CalaveraX

    Joined:
    Jul 11, 2013
    Posts:
    143
    that's another issue hahahaha, i dont know why theres a vrcore reference there, our app isnt using anything about vr, xr, ar, nothing, its a plane simple 2d game
     
  40. CalaveraX

    CalaveraX

    Joined:
    Jul 11, 2013
    Posts:
    143
    i removed all the manual tags i added on the manifests inside my unity project, and built the game again using this processor, and the result was a bit different
     

    Attached Files:

  41. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,800
    exported flags for com.unity.purchasing.googleplay.VRPurchaseActivity and universal.tools.notifications.ScheduledNotificationsRestorer are missing. This can create a launch/install crash.
     
    CalaveraX likes this.
  42. CalaveraX

    CalaveraX

    Joined:
    Jul 11, 2013
    Posts:
    143
    Any hints on how can i add the exported flags for those?
    I have added the AndroidManifestPostProcessor.cs to my project and it wont add the exported tags to those fields.

    for com.unity.purchasing.googleplay.VRPurchaseActivity I dont find any reference in the entire project, i really dont have a clue about from where this is comming.

    but for universal.tools.notifications.ScheduledNotificationsRestorer i have it on an AndroidManifest.xml file in the project, but even adding the tag in that xml, it seems to be gettting deleted from the final merged xml file.

    This is driving my crazy and i dont find any solution yet.

    Any hints would be really appreciated! Thanks!
     
  43. CalaveraX

    CalaveraX

    Joined:
    Jul 11, 2013
    Posts:
    143
    I Have finally managed to solve it.
    From the UTNotifications Plugins, i found there was 2 androidmanifests for the plugin, i've decided to merge them manually and delete the one inside editors folders.

    For the VRCore part of the manifest, it was an AndroidManifest.xml that was placed inside GooglePlay.aar inside the unitypurchase plugin, i had to open it with a zip compressor, extracted, edited it and put it again inside the aar file

    And problem solved.

    Thanks for all of your help!
     
  44. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,800
    Sorry, i just saw your messages.

    There is an alternative where you can add another manifest and use tools override option to overwrite other manifest files.
     
  45. hexdecc

    hexdecc

    Joined:
    Oct 24, 2014
    Posts:
    141
  46. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,800
    You may need to update your OneSignal plugin as receivers declared with intent-filters doesn't explicitly state exported flag.
     
  47. hexdecc

    hexdecc

    Joined:
    Oct 24, 2014
    Posts:
    141
    okay i solved problem by target api 30 level,but I will try your solution.
    What may I lose if I use target api level 30?
     
  48. tiburon

    tiburon

    Joined:
    Oct 10, 2013
    Posts:
    28
    Starting November this year, every update on Google Play must be Level 31 at least.
     
    hexdecc likes this.
  49. hexdecc

    hexdecc

    Joined:
    Oct 24, 2014
    Posts:
    141
    How can I disable OneSignal for android?
    I am using OneSignal only for iOS
     
  50. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,800
    Well, I'm not sure if there is a direct way to disable it. Basically just find the android manifest generator/manipulator and try commenting the lines which are adding entries in the manifest. Finally disable the jar/aar related to onesignal in the inspector by selecting that file.