diff --git a/AndroidManifest.xml b/AndroidManifest.xml index ec97e105..92004f4a 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -20,9 +20,9 @@ android:allowBackup="false" android:icon="@drawable/ic_launcher" android:label="@string/app_name" - android:theme="@style/AppTheme"> + android:theme="@style/AppTheme" > @@ -33,7 +33,7 @@ android:resource="@xml/account_authenticator" /> @@ -48,7 +48,7 @@ android:resource="@xml/contacts" /> @@ -61,7 +61,15 @@ + + + + + + diff --git a/res/drawable-hdpi/ic_action_new_account.png b/res/drawable-hdpi/ic_action_new_account.png new file mode 100644 index 00000000..f6e902f5 Binary files /dev/null and b/res/drawable-hdpi/ic_action_new_account.png differ diff --git a/res/drawable-hdpi/show_sync_settings.png b/res/drawable-hdpi/show_sync_settings.png new file mode 100644 index 00000000..a896c3ba Binary files /dev/null and b/res/drawable-hdpi/show_sync_settings.png differ diff --git a/res/drawable-hdpi/view_website.png b/res/drawable-hdpi/view_website.png new file mode 100644 index 00000000..41795172 Binary files /dev/null and b/res/drawable-hdpi/view_website.png differ diff --git a/res/drawable-mdpi/ic_action_new_account.png b/res/drawable-mdpi/ic_action_new_account.png new file mode 100644 index 00000000..a02d5e0c Binary files /dev/null and b/res/drawable-mdpi/ic_action_new_account.png differ diff --git a/res/drawable-mdpi/show_sync_settings.png b/res/drawable-mdpi/show_sync_settings.png new file mode 100644 index 00000000..e361f03a Binary files /dev/null and b/res/drawable-mdpi/show_sync_settings.png differ diff --git a/res/drawable-mdpi/view_website.png b/res/drawable-mdpi/view_website.png new file mode 100644 index 00000000..d5fa390c Binary files /dev/null and b/res/drawable-mdpi/view_website.png differ diff --git a/res/drawable-xhdpi/ic_action_new_account.png b/res/drawable-xhdpi/ic_action_new_account.png new file mode 100644 index 00000000..37524f81 Binary files /dev/null and b/res/drawable-xhdpi/ic_action_new_account.png differ diff --git a/res/drawable-xhdpi/show_sync_settings.png b/res/drawable-xhdpi/show_sync_settings.png new file mode 100644 index 00000000..a50d9847 Binary files /dev/null and b/res/drawable-xhdpi/show_sync_settings.png differ diff --git a/res/drawable-xhdpi/view_website.png b/res/drawable-xhdpi/view_website.png new file mode 100644 index 00000000..c41276fe Binary files /dev/null and b/res/drawable-xhdpi/view_website.png differ diff --git a/res/layout/activity_main.xml b/res/layout/activity_main.xml new file mode 100644 index 00000000..3762dcc0 --- /dev/null +++ b/res/layout/activity_main.xml @@ -0,0 +1,15 @@ + + + + + diff --git a/res/menu/main_activity.xml b/res/menu/main_activity.xml new file mode 100644 index 00000000..257651ea --- /dev/null +++ b/res/menu/main_activity.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml index 74c1f4aa..09af7149 100644 --- a/res/values-de/strings.xml +++ b/res/values-de/strings.xml @@ -25,4 +25,56 @@ Ein oder kein Adressbuch auswählen (nochmal berühren, um abzuwählen): Kalender zur Synchronisation auswählen: Präemptive Authentifizierung (empfohlen, aber nicht kompatibel mit Digest-Auth.) + + Hilfe zu DAVdroid + Sync-Konten anzeigen + DAVdroid-Website + Willkommen bei DAVdroid! + +

DAVdroid ist ein Android 4+-CalDAV/CardDAV-Sync-Adapter. Um ihn zu verwenden, müssen Sie ein DAVdroid-Konto + für Ihren Server hinzufügen. Die Kontakte/Termine werden dann automatisch in beide Richtungen synchronisiert.

+ +

Wenn Sie DAVdroid über den + Play-Store bezogen haben und Android 4.1 oder Samsung-Geräte (wie zB das Galaxy Note, Note 10.1, S2, S3, S4, …) + benutzen, müssen Sie möglicherweise den + DAVdroid JB Workaround + installieren, um Datenverlust beim Neustart zu vermeiden (dies ist ein Android-Bug).

+ +

Weitere Informationen erhalten Sie auf der DAVdroid-Homepage. + Dort finden Sie auch eine Anleitung zum Einrichten + DAVdroid ist auf den Schutz der Privatsphäre ausgelegt (siehe Datenschutzrichtlinie).

+ +

Bei Problemen lesen Sie bitte die häufig gestellten Fragen. + Im Falle eines Fehlers, der eindeutig durch DAVdroid verursacht wird, berichten Sie diesen wenn möglich auf + Github Issues, anstatt uns direkt zu kontaktieren oder die App + schlecht zu bewerten.

+ +

Open-Source

+

DAVdroid ist von Anfang an als Open-Source-Projekt ausgelegt. Der Quellcode kann jederzeit selbst kompiliert und + die App unter den Bedingungen der GPLv3 verwendet werden. Der Quellcode ist + auf Github verfügbar, die App kann auch + über F-droid bezogen werden.

+ +

Es ist jedoch viel Arbeit, die App zu entwickeln und besser zu machen. Daher haben wir uns entschlossen, sie + auch gegen eine kleine Gebühr in die Stores (Google Play, + Samsung Store) + zu stellen. Wenn Sie das Projekt unterstützen wollen, können Sie + für DAVdroid spenden oder die App kaufen.

+ +

Lizenz

+

Copyright (c) 2013 Richard Hirner (bitfire web engineering), alle Rechte + vorbehalten. Dieses Programm ist freie Software. Sie können es unter den Bedingungen der GNU + General Public License Version 3, wie von der Free Software Foundation veröffentlicht, weitergeben und/oder modifizieren. + Sofern Google Play oder Samsung Store andere Bedingungen benötigen, gelten für über den jeweiligen Markt heruntergeladene + Apps diese Bedingungen.

+ +

Benutzte Bibliotheken

+

+ * iCal4j (New BSD License)
+ * iCal4j-vcard (New BSD License)
+ * Simple XML Serialization (Apache License, Version 2.0)
+ * Project Lombok (MIT License)

+ ]]>
+ \ No newline at end of file diff --git a/res/values/strings.xml b/res/values/strings.xml index 988a5f2d..8c0ba930 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -3,10 +3,12 @@ DAVdroid Settings + - http:// - https:// + http:// + https:// + "If you don't use encryption (HTTPS), other people may easily intercept your login details, contacts and events." User name: Password: @@ -31,5 +33,55 @@ Select up to one address book (tap again to unselect): Select your calendars: Preemptive authentication (recommended, but incompatible with Digest auth) + + DAVdroid Help + Manage sync accounts + DAVdroid Web site + Welcome to DAVdroid! + +

DAVdroid is an Android 4+ sync adapter for CalDAV/CardDAV. To use it, just add a DAVdroid account + for your CalDAV/CardDAV server and your contacts/events will be synchronized in both directions.

+ +

If you have bought DAVdroid via + Play Store and use Android 4.1 or Samsung devices (for instance, Galaxy Note, Note 10.1, S2, S3, S4, …) + you may have to install the + DAVdroid JB Workaround + to prevent data-loss on reboot (it\'s an Android bug).

+ +

For more information, please see the DAVdroid homepage. + There\'s a Setup guide, too. DAVdroid respects + your privacy, see our Privacy Policy.

+ +

In case of problems, please read the FAQ first. + If you encounter a bug that is clearly related to DAVdroid, enter it on + Github issues instead of contacting us directly or giving a poor + rating for the app.

+ +

Open-source

+

DAVdroid is designed to be an open-source project from the very first beginning. It is always possible to compile the + app yourself and use it for free without any obligations. The source code is + available on Github, and you can + download the app on F-droid.

+ +

However, it was much work to create this app, so we have decided to put it into the stores (Google Play, + Samsung Store) for a small fee. + If you want to support this project, please consider donating to DAVdroid + or purchasing it.

+ +

License

+

Copyright (c) 2013 Richard Hirner (bitfire web engineering). All rights reserved. + This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 which + accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html. As far as Google Play or Samsung + Store Store require other terms, the respective terms apply for versions that are downloaded via these services.

+ +

Used third-party libraries

+

+ * iCal4j (New BSD License)
+ * iCal4j-vcard (New BSD License)
+ * Simple XML Serialization (Apache License, Version 2.0)
+ * Project Lombok (MIT License)

+ ]]>
diff --git a/res/xml/account_prefs.xml b/res/xml/account_prefs.xml index b23cf78e..a86402ae 100644 --- a/res/xml/account_prefs.xml +++ b/res/xml/account_prefs.xml @@ -1,10 +1,10 @@ - + + android:targetPackage="at.bitfire.davdroid" + android:targetClass="at.bitfire.davdroid.MainActivity" /> diff --git a/src/at/bitfire/davdroid/MainActivity.java b/src/at/bitfire/davdroid/MainActivity.java new file mode 100644 index 00000000..fd276fba --- /dev/null +++ b/src/at/bitfire/davdroid/MainActivity.java @@ -0,0 +1,51 @@ +package at.bitfire.davdroid; + +import android.app.Activity; +import android.content.Intent; +import android.net.Uri; +import android.os.Bundle; +import android.provider.Settings; +import android.text.Html; +import android.text.method.LinkMovementMethod; +import android.view.Menu; +import android.view.MenuInflater; +import android.view.MenuItem; +import android.widget.TextView; + +public class MainActivity extends Activity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + setContentView(R.layout.activity_main); + + TextView tv = (TextView)findViewById(R.id.text_info); + tv.setText(Html.fromHtml(getString(R.string.html_info))); + tv.setMovementMethod(LinkMovementMethod.getInstance()); + } + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + MenuInflater inflater = getMenuInflater(); + inflater.inflate(R.menu.main_activity, menu); + return true; + } + + + public void addAccount(MenuItem item) { + Intent intent = new Intent(Settings.ACTION_ADD_ACCOUNT); + startActivity(intent); + } + + public void showSyncSettings(MenuItem item) { + Intent intent = new Intent(Settings.ACTION_SYNC_SETTINGS); + startActivity(intent); + } + + public void showWebsite(MenuItem item) { + Intent intent = new Intent(Intent.ACTION_VIEW); + intent.setData(Uri.parse(Constants.WEB_URL_HELP + "&pk_kwd=main-activity")); + startActivity(intent); + } +} diff --git a/src/at/bitfire/davdroid/resource/LocalCalendar.java b/src/at/bitfire/davdroid/resource/LocalCalendar.java index 614815f9..44551f45 100644 --- a/src/at/bitfire/davdroid/resource/LocalCalendar.java +++ b/src/at/bitfire/davdroid/resource/LocalCalendar.java @@ -336,9 +336,9 @@ public class LocalCalendar extends LocalCollection { where = StringUtils.join(terms, " AND "); } else where = entryColumnRemoteName() + " IS NOT NULL"; - + Builder builder = ContentProviderOperation.newDelete(entriesURI()) - .withSelection(Events.CALENDAR_ID + "=? AND (" + where + ")", new String[] { String.valueOf(id) }); + .withSelection(entryColumnParentID() + "=? AND (" + where + ")", new String[] { String.valueOf(id) }); pendingOperations.add(builder .withYieldAllowed(true) .build()); diff --git a/src/at/bitfire/davdroid/resource/LocalCollection.java b/src/at/bitfire/davdroid/resource/LocalCollection.java index b9bf6fb8..8e242e1d 100644 --- a/src/at/bitfire/davdroid/resource/LocalCollection.java +++ b/src/at/bitfire/davdroid/resource/LocalCollection.java @@ -166,12 +166,11 @@ public abstract class LocalCollection { } public void commit() throws RemoteException, OperationApplicationException { - Log.i(TAG, "Committing " + pendingOperations.size() + " operations"); - - if (!pendingOperations.isEmpty()) + if (!pendingOperations.isEmpty()) { + Log.i(TAG, "Committing " + pendingOperations.size() + " operations"); providerClient.applyBatch(pendingOperations); - - pendingOperations.clear(); + pendingOperations.clear(); + } } diff --git a/src/at/bitfire/davdroid/syncadapter/SyncManager.java b/src/at/bitfire/davdroid/syncadapter/SyncManager.java index 8b4e4a6e..9dd90beb 100644 --- a/src/at/bitfire/davdroid/syncadapter/SyncManager.java +++ b/src/at/bitfire/davdroid/syncadapter/SyncManager.java @@ -28,7 +28,7 @@ import at.bitfire.davdroid.webdav.PreconditionFailedException; public class SyncManager { private static final String TAG = "davdroid.SyncManager"; - private static final int MAX_UPDATES_BEFORE_COMMIT = 100; + private static final int MAX_UPDATES_BEFORE_COMMIT = 25; protected Account account; protected AccountManager accountManager;