diff options
author | lado <herrlado@gmail.com> | 2013-02-14 23:35:14 +0100 |
---|---|---|
committer | lado <herrlado@gmail.com> | 2013-02-14 23:35:14 +0100 |
commit | f1ab3ef6c55adf41927af554ab65625b262c60cf (patch) | |
tree | 8a5fb661012e925082e0645d6ecca072f2b98256 | |
parent | f5ecd266bd8d7704405336dfb9908b23979b3c67 (diff) | |
download | vdr-manager-f1ab3ef6c55adf41927af554ab65625b262c60cf.tar.gz vdr-manager-f1ab3ef6c55adf41927af554ab65625b262c60cf.tar.bz2 |
addCalEvent
-rw-r--r-- | vdrmanager/src/de/bjusystems/vdrmanager/gui/Utils.java | 17 |
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 |