diff --git a/plugin.xml b/plugin.xml
index 92bbf0f..751dbac 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -84,8 +84,11 @@
-
+
+
+
+
@@ -103,6 +106,19 @@
+
+
+
+
+ $LOCATION_ACCESS_TITLE
+ $LOCATION_ACCESS_DESCRIPTION
+
+
+
+ $LOCATION_ACCESS_TITLE
+ $LOCATION_ACCESS_DESCRIPTION
+
+
diff --git a/src/android/LocationManager.java b/src/android/LocationManager.java
index 0d3c97f..df4fb8b 100644
--- a/src/android/LocationManager.java
+++ b/src/android/LocationManager.java
@@ -317,8 +317,19 @@ private void tryToRequestMarshmallowLocationPermission() {
}
final AlertDialog.Builder builder = new AlertDialog.Builder(activity);
- builder.setTitle("This app needs location access");
- builder.setMessage("Please grant location access so this app can detect beacons.");
+ String title = cordova.getActivity().getString(cordova.getActivity().getResources().getIdentifier( "location_access_title", "string", cordova.getActivity().getPackageName()));
+ String message = cordova.getActivity().getString(cordova.getActivity().getResources().getIdentifier( "location_access_description", "string", cordova.getActivity().getPackageName()));
+
+ if (title == null || title.isEmpty()) {
+ title = "This app needs location access"; //default title
+ }
+
+ if (message == null || message.isEmpty()) {
+ message = "Please grant location access so this app can detect beacons."; //default message
+ }
+
+ builder.setTitle(title);
+ builder.setMessage(message);
builder.setPositiveButton(android.R.string.ok, null);
builder.setOnDismissListener(new DialogInterface.OnDismissListener() {
@SuppressLint("NewApi")
diff --git a/src/android/location_access_string.xml b/src/android/location_access_string.xml
new file mode 100644
index 0000000..9c5ad89
--- /dev/null
+++ b/src/android/location_access_string.xml
@@ -0,0 +1,3 @@
+
+
+