summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlado <herrlado@gmail.com>2013-02-14 23:35:14 +0100
committerlado <herrlado@gmail.com>2013-02-14 23:35:14 +0100
commitf1ab3ef6c55adf41927af554ab65625b262c60cf (patch)
tree8a5fb661012e925082e0645d6ecca072f2b98256
parentf5ecd266bd8d7704405336dfb9908b23979b3c67 (diff)
downloadvdr-manager-f1ab3ef6c55adf41927af554ab65625b262c60cf.tar.gz
vdr-manager-f1ab3ef6c55adf41927af554ab65625b262c60cf.tar.bz2
addCalEvent
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/Utils.java17
1 files changed, 16 insertions, 1 deletions
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/Utils.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/Utils.java
index 1014b80..842de8a 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/Utils.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/Utils.java
@@ -249,6 +249,9 @@ public class Utils {
return minuts;
}
+
+
+
public static void shareEvent(Activity activity, Event event) {
final Intent share = new Intent(android.content.Intent.ACTION_SEND);
share.setType("text/plain");
@@ -272,6 +275,18 @@ public class Utils {
activity.getString(R.string.share_chooser)));
}
+
+ public static void addCalendarEvent(Activity activity, Event event){
+ Intent intent = new Intent(Intent.ACTION_EDIT);
+ intent.setType("vnd.android.cursor.item/event");
+ intent.putExtra("title", event.getTitle());
+ intent.putExtra("description", event.getShortText());
+ intent.putExtra("beginTime", event.getStart().getTime());
+ intent.putExtra("endTime", event.getStop().getTime());
+ activity.startActivity(intent);
+ }
+
+
public static String mapSpecialChars(String src) {
if (src == null) {
return "";
@@ -372,7 +387,7 @@ public class Utils {
/**
* Formats the date and time based on user's phone date/time preferences.
- *
+ *
* @param context
* the context
* @param time