diff --git a/SWADroid/res/values-es/strings.xml b/SWADroid/res/values-es/strings.xml index f93d6257..4fa2fb53 100644 --- a/SWADroid/res/values-es/strings.xml +++ b/SWADroid/res/values-es/strings.xml @@ -32,8 +32,9 @@ No Antes de usar la aplicación por primera vez debe introducir el nombre de usuario y la contraseña de acceso a SWAD en la pantalla de configuración.\n\nPuede acceder a la pantalla de configuración desde el menú de la aplicación en cualquier momento.\n\n¿Desea abrir ahora la pantalla de configuración? -IMPORTANTE +IMPORTANTEDebido a cambios en la base de datos todos los datos de las notificaciones han sido borrados.\n\nDisculpe las molestias. Error en respuesta del servidorError durante la conexión con el servidorTiempo de espera agotado intentando conectar con el servidor + \ No newline at end of file diff --git a/SWADroid/res/values/strings.xml b/SWADroid/res/values/strings.xml index 8c7d78ee..9d2819a8 100644 --- a/SWADroid/res/values/strings.xml +++ b/SWADroid/res/values/strings.xml @@ -34,8 +34,8 @@ MessagesEvaluationFrom Date Yes -NoBefore using the application for the first time you must enter the user name and password for SWAD at the setup screen.\n\nYou can access to the setup screen from the application menu anytime.\n\nDo you want to open the configuration screen now? -IMPORTANTError in server response +No +IMPORTANTBefore using the application for the first time you must enter the user name and password for SWAD at the setup screen.\n\nYou can access to the setup screen from the application menu anytime.\n\nDo you want to open the configuration screen now?Due to changes in the database all notifications data have been deleted.\n\nSorry.Error in server response Error while connecting to server Timeout trying to connect to the server diff --git a/SWADroid/src/es/ugr/swad/swadroid/SWADMain.java b/SWADroid/src/es/ugr/swad/swadroid/SWADMain.java index b739440b..1a65918a 100644 --- a/SWADroid/src/es/ugr/swad/swadroid/SWADMain.java +++ b/SWADroid/src/es/ugr/swad/swadroid/SWADMain.java @@ -108,9 +108,9 @@ public class SWADMain extends ExpandableListActivity { } /** - * Shows initial dialog on first run. + * Shows configuration dialog on first run. */ - public void showInitialDialog() { + public void showConfigurationDialog() { new AlertDialog.Builder(this) .setTitle(R.string.initialDialogTitle) .setMessage(R.string.firstRunMsg) @@ -126,6 +126,18 @@ public class SWADMain extends ExpandableListActivity { } }).show(); } + + /** + * Shows initial dialog after application upgrade. + */ + public void showInitialDialog() { + new AlertDialog.Builder(this) + .setTitle(R.string.initialDialogTitle) + .setMessage(R.string.upgradeMsg) + .setCancelable(false) + .setNeutralButton(R.string.close_dialog, null) + .show(); + } /* (non-Javadoc) * @see android.app.Activity#onCreateOptionsMenu() @@ -292,8 +304,12 @@ public class SWADMain extends ExpandableListActivity { lastVersion = prefs.getLastVersion(); currentVersion = getPackageManager().getPackageInfo(getPackageName(), 0).versionCode; if(lastVersion == 0) { - showInitialDialog(); + showConfigurationDialog(); prefs.setLastVersion(currentVersion); + } else if(currentVersion > lastVersion) { + dbHelper.emptyTable(Global.DB_TABLE_NOTIFICATIONS); + prefs.setLastVersion(currentVersion); + showInitialDialog(); } } catch (Exception ex) { Log.e(ex.getClass().getSimpleName(), ex.getMessage());