warning: [deprecation] getColor(int) in Resources has been deprecated

Reference:

https://developer.android.com/reference/android/content/res/Resources#getColor(int)https://developer.android.com/reference/android/content/res/Resources#getColor(int)

This method is deprecated from API level 23, so you can safely manage this situation with:

int MyColor=0;
if (Build.VERSION.SDK_INT >= 23) // the new version of the API
     myColor = getResources()
        .getColor(
            R.color.primaryColor, 
            getActivity.getTheme()
        )
     );
else  // the old version of the API
    myColor = getResources()
        .getColor(R.color.primaryColor));

warning: [deprecation] getInstallerPackageName(String) in PackageManager has been deprecated

Reference: https://developer.android.com/reference/android/content/pm/PackageManager#getInstallerPackageName(java.lang.String)

This Method is deprecated from API level 30, so you can safely manage this situation with:

if (Build.VERSION.SDK_INT >= 30) {

    InstallSourceInfo isi = getContext()
        .getPackageManager()
        .getInstallSourceInfo(getContext()
        .getPackageName());

    // now, with an InstallSourceInfo object, you have access to three useful methods

    String initiating = isi.getInitiatingPackageName();
    String installing = isi.getInstallingPackageName();
    String originating = isi.getOriginatingPackageName();

} else { // continue to use the old version API

    String installerPackageName = getContext()
        .getPackageManager()
        .getInstallerPackageName(
            getContext().getPackageName()
        );
}

getInitiatingPackageName returns the name of the package that requested the installation, or null if not available. This is normally the same as the old getInstallerPackageName.