Commit ae83d4bd authored by Ricki Hirner's avatar Ricki Hirner 🐑
Browse files

Add README, fix bugs

parent 15860a8a
# ICSdroid
Web: https://icsdroid.bitfire.at/
ICSdroid is a Android 4.0+ app to subscribe to remote iCalendar files (like
time tables of your school/university or event files of your sports team).
It will download the remote calendars with a certain (free-to-choose) interval
and synchronize them into local native read-only calendars which can then used
with your calendar app.
No data (neither login data, nor calendar data, nor statistical or usage data)
is transferred to anywhere except the chosen server. No Google Calendar or
account required.
## How to use
1. Subscribe to .ics calendars by clicking them in your browser (either http[s]://…/xxx.ics or
webcal[s]:// URLs are supported).
2. Enter title and select a color.
3. In the ICSdroid main activity, you can set your sync interval. Single-tap existing
calendars to edit/delete them.
4. Swipe the calendar list to force a synchronization.
## Contact
```
bitfire web engineering – Hirner, Stockmann GesnbR
Florastraße 27
2540 Bad Vöslau, AUSTRIA
```
Email: [play@bitfire.at](mailto:play@bitfire.at)
## License
Copyright (C) 2013 – 2015 bitfire web engineering (Ricki Hirner, Bernhard Stockmann).
This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome
to redistribute it under the conditions of the [GNU GPL v3](https://www.gnu.org/licenses/gpl-3.0.html).
......@@ -72,7 +72,7 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex-cache" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.0.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/cardview-v7/22.0.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/cardview-v7/23.0.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/design/23.0.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/23.0.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.github.yukuku/ambilwarna/2.0/jars" />
......@@ -95,6 +95,7 @@
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="lombok-1.16.4" level="project" />
<orderEntry type="library" exported="" name="bndlib-2.3.0" level="project" />
<orderEntry type="library" exported="" name="cardview-v7-23.0.0" level="project" />
<orderEntry type="library" exported="" name="slf4j-android-1.7.12" level="project" />
<orderEntry type="library" exported="" name="org.osgi.core-4.3.1" level="project" />
<orderEntry type="library" exported="" name="design-23.0.0" level="project" />
......@@ -104,7 +105,6 @@
<orderEntry type="library" exported="" name="commons-lang3-3.4" level="project" />
<orderEntry type="library" exported="" name="ical4j-2.0-beta1" level="project" />
<orderEntry type="library" exported="" name="support-v4-23.0.0" level="project" />
<orderEntry type="library" exported="" name="cardview-v7-22.0.0" level="project" />
<orderEntry type="library" exported="" name="slf4j-api-1.7.12" level="project" />
<orderEntry type="library" exported="" name="support-annotations-23.0.0" level="project" />
<orderEntry type="library" exported="" name="commons-codec-1.9" level="project" />
......
......@@ -19,13 +19,13 @@ android {
defaultConfig {
applicationId "at.bitfire.icsdroid"
minSdkVersion 14
targetSdkVersion 22
targetSdkVersion 23
versionCode 1
versionName "1.0"
versionName "0.9"
}
buildTypes {
release {
minifyEnabled false
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
......@@ -40,7 +40,7 @@ dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':lib:ical4android')
compile 'com.android.support:appcompat-v7:23.0+'
compile 'com.android.support:cardview-v7:22.0+'
compile 'com.android.support:cardview-v7:23.0+'
compile 'com.android.support:design:23.0+'
compile 'com.github.yukuku:ambilwarna:2.0'
compile 'org.apache.commons:commons-io:1.3.2'
......
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /home/rfc2822/opt/android-sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# ProGuard usage for ICSdroid:
# shrinking yes - main reason for using ProGuard
# optimization no - too risky
# obfuscation no - ICSdroid is open-source
# preverification no (Android default)
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
-dontobfuscate
# ical4j: ignore unused dynamic libraries
-dontwarn groovy.** # Groovy-based ContentBuilder not used
-dontwarn org.codehaus.groovy.**
-dontwarn org.apache.commons.logging.** # Commons logging is not available
-dontwarn net.fortuna.ical4j.model.** # ignore warnings from Groovy dependency
-keep class net.fortuna.ical4j.model.** { *; } # keep all model classes (properties/factories, created at runtime)
-dontwarn yuku.ambilwarna.widget.AmbilWarnaPrefWidgetView
# keep ICSdroid and ical4android
-keep class at.bitfire.** { *; } # all DAVdroid code is required
# unneeded libraries
-dontwarn aQute.**
......@@ -81,6 +81,7 @@
<activity
android:name=".ui.EditCalendarActivity"
android:label="@string/activity_edit_calendar"
android:windowSoftInputMode="stateHidden"
android:parentActivityName=".ui.CalendarListActivity" />
<activity
android:name=".ui.InfoActivity"
......
......@@ -87,7 +87,7 @@ public class SyncAdapter extends AbstractThreadedSyncAdapter {
conn.setRequestProperty("Authorization", "Basic " + Base64.encodeToString(basicCredentials.getBytes(), 0));
}
if (calendar.getETag()!= null)
if (calendar.getETag() != null)
conn.setRequestProperty("If-None-Match", calendar.getETag());
if (calendar.getLastModified() != 0) {
Date date = new Date(calendar.getLastModified());
......
......@@ -56,12 +56,6 @@ public class AddCalendarEnterUrlFragment extends Fragment implements TextWatcher
View v = inflater.inflate(R.layout.add_calendar_enter_url, container, false);
setHasOptionsMenu(true);
editURL = (EditText)v.findViewById(R.id.url);
Uri createUri = getActivity().getIntent().getData();
editURL.addTextChangedListener(this);
if (createUri != null)
editURL.setText(createUri.toString());
credentials = new CredentialsFragment();
credentials.setOnChangeListener(this);
getChildFragmentManager().beginTransaction()
......@@ -69,6 +63,14 @@ public class AddCalendarEnterUrlFragment extends Fragment implements TextWatcher
.commit();
insecureAuthWarning = (TextView)v.findViewById(R.id.insecure_authentication_warning);
editURL = (EditText)v.findViewById(R.id.url);
Uri createUri = getActivity().getIntent().getData();
editURL.addTextChangedListener(this);
if (createUri != null)
// This causes the onTextChanged listeners to be activated - credentials and insecureAuthWarning are already required!
editURL.setText(createUri.toString());
return v;
}
......@@ -80,7 +82,7 @@ public class AddCalendarEnterUrlFragment extends Fragment implements TextWatcher
@Override
public void onPrepareOptionsMenu(Menu menu) {
MenuItem itemNext = menu.findItem(R.id.next);
boolean urlOK = StringUtils.isNotBlank(editURL.getText().toString()),
boolean urlOK = activity.url != null,
authOK = !credentials.authRequired || (StringUtils.isNotBlank(credentials.username) && StringUtils.isNotBlank(credentials.password));
itemNext.setEnabled(urlOK && authOK);
}
......
......@@ -108,7 +108,7 @@ public class CalendarListActivity extends AppCompatActivity implements LoaderMan
}
};
syncStatusHandle = ContentResolver.addStatusChangeListener(ContentResolver.SYNC_OBSERVER_TYPE_ACTIVE, this);
refresher.setRefreshing(AppAccount.isSyncActive(this));
syncStatusHandler.sendEmptyMessage(0);
}
@Override
......@@ -124,7 +124,7 @@ public class CalendarListActivity extends AppCompatActivity implements LoaderMan
@Override
public void onStatusChanged(int which) {
if (which == ContentResolver.SYNC_OBSERVER_TYPE_ACTIVE && syncStatusHandler != null)
syncStatusHandler.sendMessage(new Message());
syncStatusHandler.sendEmptyMessage(0);
}
......
......@@ -155,6 +155,8 @@ public class EditCalendarActivity extends AppCompatActivity implements LoaderMan
values.put(CalendarContract.Calendars.CALENDAR_DISPLAY_NAME, fragTitleColor.title);
values.put(CalendarContract.Calendars.CALENDAR_COLOR, fragTitleColor.color);
values.put(CalendarContract.Calendars.SYNC_EVENTS, switchSyncCalendar.isChecked() ? 1 : 0);
values.put(LocalCalendar.COLUMN_USERNAME, fragCredentials.authRequired ? fragCredentials.username : null);
values.put(LocalCalendar.COLUMN_PASSWORD, fragCredentials.authRequired ? fragCredentials.password : null);
calendar.update(values);
success = true;
}
......
......@@ -91,8 +91,8 @@
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="commons-lang3-3.4" level="project" />
<orderEntry type="library" exported="" name="lombok-1.16.4" level="project" />
<orderEntry type="library" exported="" name="ical4j-2.0-beta1" level="project" />
<orderEntry type="library" exported="" name="bndlib-2.3.0" level="project" />
<orderEntry type="library" exported="" name="ical4j-2.0-beta1" level="project" />
<orderEntry type="library" exported="" name="slf4j-android-1.7.12" level="project" />
<orderEntry type="library" exported="" name="org.osgi.core-4.3.1" level="project" />
<orderEntry type="library" exported="" name="slf4j-api-1.7.12" level="project" />
......
Subproject commit 7dbe6c69571298a647a710a583c32f0fd9df4bbe
Subproject commit b9da7d9edc5fc316a8611c54182e472ce057bfe2
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment