1
0
mirror of https://github.com/nerzhul/ownCloud-SMS-App.git synced 2025-06-24 16:26:45 +00:00
This commit is contained in:
Loïc Blot (@U-Exp) 2014-12-12 15:01:24 +01:00
commit 455f860902
22 changed files with 293 additions and 13 deletions

View File

@ -21,10 +21,12 @@ ownCloud SMS Android Application licence is in reflexion, then sources are parti
## Contributions
We are searching for translations in others langs (german, russian, italian, japanese).
We are searching for translations in others langs
To contribute please download res/values/strings.xml and res/values/google_playstore_strings.xml and give us a translated version !
You can also contribute by adding patches in Java code or cleanups.
## Requirements
- An ownCloud instance with ocsms app

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
res/drawable/login_logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@ -26,12 +26,16 @@
*/
-->
<resources>
<!-- Translation version, reference for translators -->
<string name="translation_version">3</string>
<!-- Translations must begin here -->
<string name="gp_short_description">ownCloud SMS synchronizuje vaše lokální SMS zprávy na váš server ownCloud</string>
<string name="gp_description">
Aplikace ownCloud SMS synchronizuje vaše SMS zprávy na vzdálenou instanci ownCloud, kde si poté můžete zprávy přečíst.
Zasílání SMS ze serveru ownCloud bude doplněno v příštích vydáních.
Applikace je plně kompatibilní pro Android 4.0 až 4.4
Applikace je plně kompatibilní pro Android 4.0 až 5.0
</string>
</resources>

View File

@ -26,6 +26,8 @@
*/
-->
<resources>
<!-- Translation version, reference for translators -->
<string name="translation_version">1</string>
<!-- Translations must begin there -->
<!-- Preferences -->

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
* Copyright (c) 2014, Loic Blot <loic.blot@unix-experience.fr>
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-->
<resources>
<!-- Translation version, reference for translators -->
<string name="translation_version">3</string>
<!-- Translations must begin there -->
<string name="gp_short_description">Mit ownCloud SMS kannst Du Deine SMS mit Deiner ownCloud synchronisieren</string>
<string name="gp_description">
Die ownCloud SMS App synchronisiert Deine SMS-Nachrichten mit einer ownCloud-Instanz und erlaubt Dir, die SMS dort zu lesen.
In kommenden Versionen soll auch den SMS-Versand von der ownCloud-Instanz aus möglich sein.
Auf diese Weise wirst Du von überall in der Welt SMS versenden können, solange Dein Android-Smartphone GSM- und Datenempfang hat.
Die App ist vollständig kompatibel mit Android 4.0 bis 5.0
</string>
</resources>

133
res/values-de/strings.xml Normal file
View File

@ -0,0 +1,133 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
* Copyright (c) 2014, Loic Blot <loic.blot@unix-experience.fr>
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-->
<resources>
<!-- Translation version, reference for translators -->
<string name="translation_version">2</string>
<!-- Translations must begin there -->
<!-- Preferences -->
<string name="pref_title_sync">SMS - Schnell</string>
<string name="pref_title_sync_frequency">Schnelle Sync-Frequenz</string>
<string name="pref_title_slow_sync">SMS - Langsam &amp; Sicher</string>
<string name="pref_title_slow_sync_frequency">Langsame Sync-Frequenz</string>
<string name="action_settings">Einstellungen</string>
<string name="sync_now">Jetzt synchronisieren</string>
<string name="pref_category_sync">Synchronisierung</string>
<string name="title_global_pref_to_general_prefs">Allg. Einstellungen</string>
<string name="summary_global_pref_to_general_prefs">Sync-Einstellungen</string>
<string name="summary_notif_prefs">Benachrichtigungen</string>
<string name="pref_header_data_sync">Daten &amp; Sync</string>
<string name="title_activity_general_settings">Allg. Einstellungen</string>
<string-array name="pref_sync_frequency_titles">
<item>5 Minuten</item>
<item>15 Minuten</item>
<item>30 Minuten</item>
<item>1 Stunde</item>
<item>3 Stunden</item>
<item>6 Stunden</item>
<item>12 Stunden</item>
<item>24 Stunden</item>
<item>Nie</item>
</string-array>
<string-array name="pref_sync_frequency_values">
<item>5</item>
<item>15</item>
<item>30</item>
<item>60</item>
<item>180</item>
<item>360</item>
<item>720</item>
<item>1440</item>
<item>-1</item>
</string-array>
<string-array name="pref_slow_sync_frequency_titles">
<item>1 Stunde</item>
<item>3 Stunden</item>
<item>6 Stunden</item>
<item>12 Stunden</item>
<item>24 Stunden</item>
<item>Nie</item>
</string-array>
<string-array name="pref_slow_sync_frequency_values">
<item>60</item>
<item>180</item>
<item>360</item>
<item>720</item>
<item>1440</item>
<item>-1</item>
</string-array>
<string name="title_activity_login">Einloggen</string>
<!-- Login -->
<string name="prompt_login">Login</string>
<string name="prompt_password">Passwort</string>
<string name="action_sign_in">Einloggen oder Registrieren</string>
<string name="action_sign_in_short">Einloggen</string>
<string name="error_invalid_login">Falscher Benutzername oder Passwort</string>
<string name="error_invalid_password">Dieses Passwort ist zu kurz</string>
<string name="error_field_required">Pflichtfeld</string>
<string name="prompt_serverURI">Server-Adresse</string>
<string name="error_invalid_server_address">Ungültige Serveradresse</string>
<string name="error_connection_failed">Verbindung fehlgeschlagen, ist dies der richtige Server?</string>
<string name="error_http_connection_failed">Kann keine HTTP-Verbindung aufbauen. Läuft der Webserver unter dieser Adresse?</string>
<string-array name="protocol_array">
<item>https://</item>
<item>http://</item>
</string-array>
<!-- Notifications -->
<string name="sync_title">Synchronisation</string>
<string name="sync_inprogress">Sychronisation läuft...</string>
<string name="fatal_error">Kritischer Fehler!</string>
<!-- Errors -->
<string name="err_sync_get_smslist">Fehler #1: Bei vorherigen Nachrichten ungültige Serverdaten empfangen</string>
<string name="err_sync_craft_http_request">Fehler #2: Fehler bei der Erstellung des HTTP-Requests</string>
<string name="err_sync_push_request">Fehler #3: Push-Request fehlgeschlagen</string>
<string name="err_sync_push_request_resp">Fehler #4: Beim Pushen von Daten ungültige Serverdaten empfangen</string>
<string name="err_sync_create_json_null_smslist">Fehler #5: SMS-Liste gab NULL zurück</string>
<string name="err_sync_create_json_put_smslist">Fehler #6: Fehler bei der Erstellung des Push-Requests</string>
<string name="err_sync_create_json_request_encoding">Fehler #7: Ungültige Zeichenkodierung bei der Erstellung des Requests</string>
<string name="err_sync_auth_failed">Fehler #8: Anmeldung fehlgeschlagen</string>
<string name="err_sync_http_request_returncode_unhandled">Fehler #9: Unbekannter HTTP-Antwortcode vom Server</string>
<string name="err_sync_http_request_connect">Fehler #11: Konnte nicht mit der ownCloud-Instanz verbinden (HTTP-Request)</string>
<string name="err_sync_http_request_httpexception">Fehler #12: Konnte nicht mit der ownCloud-Instanz verbinden (HTTP-Ausnahme)</string>
<string name="err_sync_http_request_ioexception">Fehler #13: Konnte nicht mit der ownCloud-Instanz verbinden (IO-Fehler)</string>
<string name="err_sync_http_request_resp">Fehler #14: Konnte Server-Antwort nicht parsen</string>
<string name="err_sync_http_request_parse_resp">Fehler #15: Konnte Server-Antwort nicht parsen</string>
</resources>

View File

@ -26,12 +26,16 @@
*/
-->
<resources>
<!-- Translation version, reference for translators -->
<string name="translation_version">3</string>
<!-- Translations must begin here -->
<string name="gp_short_description">ownCloud SMS synchronize your local SMS on your ownCloud instance</string>
<string name="gp_description">
ownCloud SMS application synchronize your SMS messages on a remote ownCloud instance and let you read your messages from it.
Sending SMS from ownCloud instance will coming in a future release.
Application is fully compatible from Android 4.0 to 4.4
Application is fully compatible from Android 4.0 to 5.0
</string>
</resources>

View File

@ -26,6 +26,9 @@
*/
-->
<resources>
<!-- Translation version, reference for translators -->
<string name="translation_version">2</string>
<!-- Translations must begin there -->
<!-- Preferences -->
<string name="pref_title_sync">Fast Sync</string>

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
* Copyright (c) 2014, Loic Blot <loic.blot@unix-experience.fr>
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-->
<resources>
<!-- Translation version, reference for translators -->
<string name="translation_version">0</string>
<!-- Translations must begin here -->
<!-- Missing translations ! -->
</resources>

View File

@ -28,10 +28,12 @@
-->
<resources>
<string name="pref_title_sync_frequency">Frecuencia de sincronización</string>
<!-- Translation version, reference for translators -->
<string name="translation_version">1</string>
<!-- Translations must begin there -->
<!-- Preferences -->
<string name="pref_title_sync_frequency">Frecuencia de sincronización</string>
<string name="action_settings">Configuración</string>
<string name="sync_now">Sincronizar ahora</string>
<string name="pref_category_sync">Sincronización</string>

View File

@ -26,12 +26,16 @@
*/
-->
<resources>
<!-- Translation version, reference for translators -->
<string name="translation_version">3</string>
<!-- Translations must begin there -->
<string name="gp_short_description">ownCloud SMS permet de synchroniser vos SMS sur votre instance ownCloud</string>
<string name="gp_description">
L\'application ownCloud SMS vous permet de synchroniser vos messages SMS sur une instance ownCloud distante et ainsi de pouvoir les lire.
Il est prévu d\'ajouter le support de l\'envoi de SMS depuis l\'instance ownCloud dans une future mise à jour, vous permettant d\'envoyer des SMS depuis n\'importe où dans le monde, en laissant votre téléphone Android à portée d\'un accès DATA et GSM
L\'application est pleinement compatible des versions Android 4.0 à 4.4
L\'application est pleinement compatible des versions Android 4.0 à 5.0
</string>
</resources>

View File

@ -26,6 +26,10 @@
*/
-->
<resources>
<!-- Translation version, reference for translators -->
<string name="translation_version">2</string>
<!-- Translations must begin there -->
<string name="app_name">ownCloud-SMS</string>
<string name="action_settings">Paramètres</string>

11
res/values-v11/styles.xml Normal file
View File

@ -0,0 +1,11 @@
<resources>
<!--
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
-->
<style name="AppBaseTheme" parent="Theme.AppCompat.Light">
<!-- API 11 theme customizations can go here. -->
</style>
</resources>

12
res/values-v14/styles.xml Normal file
View File

@ -0,0 +1,12 @@
<resources>
<!--
Base application theme for API 14+. This theme completely replaces
AppBaseTheme from BOTH res/values/styles.xml and
res/values-v11/styles.xml on API 14+ devices.
-->
<style name="AppBaseTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- API 14 theme customizations can go here. -->
</style>
</resources>

View File

@ -0,0 +1,10 @@
<resources>
<!--
Example customization of dimensions originally defined in res/values/dimens.xml
(such as screen margins) for screens with more than 820dp of available width. This
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively).
-->
<dimen name="activity_horizontal_margin">64dp</dimen>
</resources>

View File

@ -26,12 +26,16 @@
*/
-->
<resources>
<!-- Translation version, reference for translators -->
<string name="translation_version">3</string>
<!-- Translations must begin here -->
<string name="gp_short_description">ownCloud SMS synchronize your local SMS on your ownCloud instance</string>
<string name="gp_description">
ownCloud SMS application synchronize your SMS messages on a remote ownCloud instance and let you read your messages from it.
Sending SMS from ownCloud instance will coming in a future release.
Application is fully compatible from Android 4.0 to 4.4
Application is fully compatible from Android 4.0 to 5.0
</string>
</resources>

View File

@ -26,6 +26,8 @@
*/
-->
<resources>
<!-- Translation version, reference for translators -->
<string name="translation_version">2</string>
<!-- System strings, do not translate -->
<string name="app_name">ownCloud-SMS</string>

View File

@ -24,10 +24,12 @@ import android.animation.AnimatorListenerAdapter;
import android.annotation.TargetApi;
import android.app.Activity;
import android.content.ContentResolver;
import android.content.Intent;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.provider.Settings;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.View;
@ -283,6 +285,11 @@ public class LoginActivity extends Activity {
ContentResolver.addPeriodicSync(account, getString(R.string.account_authority), b, 15 * 60);
// Then it's finished
finish();
// Start sync settings, we have finished to configure account
Intent settingsIntent = new Intent(Settings.ACTION_SYNC_SETTINGS);
settingsIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
getApplicationContext().startActivity(settingsIntent);
} else {
switch (_returnCode) {
case INVALID_ADDR: