commit 4f42d0f18265310551cf6fa2fe3b2af705871602 Author: Loic Blot Date: Fri Oct 10 12:01:49 2014 +0200 Merge diff --git a/README.md b/README.md new file mode 100644 index 0000000..04119f2 --- /dev/null +++ b/README.md @@ -0,0 +1,51 @@ +# ownCloud SMS Android Application Offical Repository + +## Introduction + +ownCloud SMS app push your Android devices conversation into your ownCloud instance, using ocsms app. + +Android download link: https://play.google.com/store/apps/details?id=fr.unix_experience.owncloud_sms + +ocsms app sources are available here: https://github.com/nerzhul/ocsms/ + +## Application documentation + +You can found application documentation here: https://github.com/nerzhul/ownCloud-SMS-App/wiki + +## Licence + +ownCloud SMS Android Application licence is in reflexion, then sources are partial. + +- App locales are under BSD 2 clause licence + +## Contributions + +We are searching for translations in others langs (german, spanish, russian). + +To contribute please download res/values/strings.xml and give us a translated version ! + +## Requirements +- An ownCloud instance with ocsms app + + +## Issue template + +Server +- ownCloud version: X.X.X +- PHP version: X.X +- HTTPd server: +- HTTPS: + +Client +- Android version: X.X.X +- Phone: +- ownCloud SMS app version: X.X.X + + +Please create your issues for the client here: + +https://github.com/nerzhul/ownCloud-SMS-App/issues + +And for the server app here: + +https://github.com/nerzhul/ocsms/issues diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml new file mode 100644 index 0000000..2e7f4f8 --- /dev/null +++ b/res/values-fr/strings.xml @@ -0,0 +1,86 @@ + + + + + ownCloud-SMS + Paramètres + Synchroniser maintenant + + + Synchronisation + + Préférences générales + Options de synchronisation + Notifications + + Données & synchronisation + Fréquence de synchronisation + + Préférences générales + + + 15 minutes + 30 minutes + 1 heure + 3 heures + 6 heures + 12 heures + 24 heures + Jamais + + + 15 + 30 + 60 + 180 + 360 + 720 + 1440 + -1 + + + Connexion + + + Identifiant + Mot de passe + S\'enregistrer ou se connecter + Se connecter + Identifiant ou mot de passe incorrect + Ce mot de passe est trop court + Ce champ est requis + Adresse du serveur + Adresse invalide + Echec de connexion, assurer vous qu\'il s\'agit du bon serveur + Impossible d\'effectuer la connexion HTTP. Assurez vous qu\'il s\'agit d\'un serveur HTTP + + + Processus de synchronisation + Synchonisation en cours... + Erreur fatale ! + diff --git a/res/values/strings.xml b/res/values/strings.xml new file mode 100644 index 0000000..fcefc92 --- /dev/null +++ b/res/values/strings.xml @@ -0,0 +1,99 @@ + + + + + ownCloud-SMS + fr.unix_experience.owncloud_sms + fr.unix_experience.owncloud_sms.datasync.provider + + fr.unix_experience.owncloud_sms + Sync frequency + + + + Settings + Synchronize now + Synchronization + + General preferences + Sync options + Notifications + + Data & sync + + General Settings + + Sync frequency + + + 15 minutes + 30 minutes + 1 hour + 3 hours + 6 hours + 12 hours + 24 hours + Never + + + 15 + 30 + 60 + 180 + 360 + 720 + 1440 + -1 + + + Sign in + + + Login + Password + Sign in or register + Sign in + Login or password incorrect + This password is too short + This field is required + Server address + Invalid server address + Connection failed, ensure this is the right server + Unable to perform a HTTP connection. Please ensure there is a web server + + + https:// + http:// + + + + Sync process + Sync in progress... + Fatal error ! + + diff --git a/src/fr/unix_experience/owncloud_sms/sync_adapters/SmsSyncService.java b/src/fr/unix_experience/owncloud_sms/sync_adapters/SmsSyncService.java new file mode 100644 index 0000000..657142b --- /dev/null +++ b/src/fr/unix_experience/owncloud_sms/sync_adapters/SmsSyncService.java @@ -0,0 +1,68 @@ +package fr.unix_experience.owncloud_sms.sync_adapters; + +/* + * Copyright (c) 2014, Loic Blot + * 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. + */ + +import android.app.Service; +import android.content.Intent; +import android.os.IBinder; + +public class SmsSyncService extends Service { + // Storage for an instance of the sync adapter + private static SmsSyncAdapter _adapter = null; + // Object to use as a thread-safe lock + private static final Object sSyncAdapterLock = new Object(); + /* + * Instantiate the sync adapter object. + */ + @Override + public void onCreate() { + /* + * Create the sync adapter as a singleton. + * Set the sync adapter as syncable + * Disallow parallel syncs + */ + synchronized (sSyncAdapterLock) { + if (_adapter == null) { + _adapter = new SmsSyncAdapter(getApplicationContext(), true); + } + } + } + /** + * Return an object that allows the system to invoke + * the sync adapter. + * + */ + @Override + public IBinder onBind(Intent intent) { + /* + * Get the object that allows external processes + * to call onPerformSync(). The object is created + * in the base class code when the SyncAdapter + * constructors call super() + */ + return _adapter.getSyncAdapterBinder(); + } +}