diff --git a/app/build.gradle b/app/build.gradle
index f1e9ed2c1..81ca3a8c4 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -26,6 +26,10 @@ android {
"ko", "lt", "nl", "pl", "pt", "pt-BR", "ru", "sk", "sl", "zh-CN"]
buildConfigField "String[]", "SUPPORTED_LOCALES", "new String[]{\""+
supportedLocales.join("\",\"")+"\"}"
+
+ // Allow distinguishing between release and debug app when installed
+ // simultaneously (see below).
+ manifestPlaceholders = [appLabel: "@string/app_name"]
}
signingConfigs {
@@ -58,6 +62,12 @@ android {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
+
+ debug {
+ // Allow installing debug version in parallel.
+ applicationIdSuffix ".debug"
+ manifestPlaceholders = [appLabel: "Kore (Debug)"]
+ }
}
buildFeatures {
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 3eaaefdbb..c622af012 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -26,10 +26,11 @@
+
@@ -184,9 +185,13 @@
+
diff --git a/app/src/main/java/org/xbmc/kore/provider/MediaContract.java b/app/src/main/java/org/xbmc/kore/provider/MediaContract.java
index 915ffcd73..f286e9d43 100644
--- a/app/src/main/java/org/xbmc/kore/provider/MediaContract.java
+++ b/app/src/main/java/org/xbmc/kore/provider/MediaContract.java
@@ -18,12 +18,14 @@
import android.net.Uri;
import android.provider.BaseColumns;
+import org.xbmc.kore.BuildConfig;
+
/**
* Contract class for interacting with {@link MediaProvider}.
*/
public class MediaContract {
- public static final String CONTENT_AUTHORITY = "org.xbmc.kore.provider";
+ public static final String CONTENT_AUTHORITY = BuildConfig.APPLICATION_ID + ".provider";
public static final Uri BASE_CONTENT_URI = Uri.parse("content://" + CONTENT_AUTHORITY);