Search code examples
androiddebuggingandroid-studiouid

change UID of app in debug mode in Android studio


i want testing share data between two apps that have same UID. how change UID of apps in android studio and set a same UID for two diffrent apps?


Solution

  • You need to use sharedUserId which will share data between two different apps.

    In manifest:

    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
              package="string"
              android:sharedUserId="your_uid_in_string" // change here..
              android:sharedUserLabel="string resource" 
              android:versionCode="integer"
    

    Manifest Elements for Android Developers