public static String actionTitle(String specialUrl) { if (specialUrl.startsWith("http://m.mit.edu/open-house")) { OpenHouseCategory category = getOpenHouseCategory(specialUrl); if (category != null) { return "MIT150 Open House: " + category.getTitle(); } ; // must not be a specific category return "MIT150 Open House"; } return null; }
public static String actionUrl(String specialUrl) { if (specialUrl.startsWith("http://m.mit.edu/open-house")) { OpenHouseCategory category = getOpenHouseCategory(specialUrl); if (category != null) { try { return "mitmobile://calendar/category?listID=OpenHouse" + "&catID=" + category.getCatID() + "&title=" + URLEncoder.encode(category.getTitle(), "UTF-8"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); return null; } } ; return "mitmobile://calendar/category?listID=OpenHouse"; } return null; }