Search Unity

android:sharedUserId

Discussion in 'Android' started by charnold, Dec 5, 2015.

  1. charnold

    charnold

    Joined:
    Mar 31, 2014
    Posts:
    31
    Hi!

    Is there a way to set the sharedUserId directly in Unity? (At the moment, I'm manually modifying the AndroidManifest and putting this into Assets/Plugins/Android)
     
  2. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    Is this value changing often? What's wrong with Creating a manifest and setting that value there ?

    Another option (some plugins use it) is dynamically read the AndroidManifest (it's an .XML file) and update values in there automatically.
     
  3. charnold

    charnold

    Joined:
    Mar 31, 2014
    Posts:
    31
    I'm not sure, how the settings of the AndroidManifest in Plugins/Android are merged (for the final AndroidManifest) with the values, that are set in Unity. Everything, I've tested so far is working, I just want to be sure, that values, I change in the future in Unity, are taken for the final AndroidManifest.
     
  4. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    Unity has its own "library" project with its libraries and AndroidManifest.
    Whatever you place under Assets/Plugins/Android gets merged together, so whatever values you set there will be merged and used in the game package that you build.
     
  5. charnold

    charnold

    Joined:
    Mar 31, 2014
    Posts:
    31
    How are they merged? Which one has priority, when there are conflicts / same setting in Unity AndroidManifest and Assets/Plugins/Android AndroidManifest? (it seems, Unity's settings have priority?)
     
  6. hengineer

    hengineer

    Joined:
    Mar 18, 2013
    Posts:
    13
    Did you figure this out?
    I'm also trying to set "android:sharedUserId" but I haven't figured out how. I tried putting a custom AndroidManifest in Assets/Plugins/Android but I can't figure out the right information include to avoid getting "incompatible merge" or "unable to build APK" errors.
     
  7. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    You can post the full error you are getting so we can see whats causing the conflict.

    I don't think that theres a priority.. It's just combining all of them together and fails if it cannot do a merge.
     
  8. hengineer

    hengineer

    Joined:
    Mar 18, 2013
    Posts:
    13
    I got it working using the Android Manifest Manager plugin: https://www.assetstore.unity3d.com/en/#!/content/24849 but it also adds some other properties and settings. It would still be nice to know the minimal XML file that would result in just adding the "sharedUserId" property but otherwise keeping the file the same.