开发者

Calendar Intent field Title/Description not working in Motorola Xoom Honeycomb 3.1 and Acer Iconia

I am developing an app that send datas to Android calendar via Intent. It works perfect with the default android calendar from 2.1 to 2.3.4 and also with 3rd party calendar like Jorte or Business Calender.

But with Honeycomb (Acer Iconia and Motorola Xoom) I am getting NO TITLE AND DESCRIPTION PASSED IN THE FIELD.

I have all the passed field filled, year, month, day, hours, minutes, but NO DESCRIPTION AND TITLE

GregorianCalendar cal = new GregorianCalendar();
Intent intent = new Intent(Intent.ACTION_EDIT);
intent.setType("vnd.android.cursor.item/event");
cal.set(Calendar.YEAR, Integer.parseInt(pv.getYear()));
cal.set(Calendar.MONTH, Integer.parseInt(pv.getMonth()));
cal.set(Calendar.DAY_OF_MONTH, Integer.parseInt(pv.getDay()));
cal.set(Calendar.HOUR_OF_DAY, Integer.parseInt(pv.getHours()));
cal.set(Calendar.MINUTE, Integer.parseInt(pv.getMinutes()));
cal.set(Calendar.S开发者_高级运维ECOND, 0);
cal.set(Calendar.MILLISECOND, 0); 

intent.putExtra("beginTime", cal.getTimeInMillis());
cal.add(Calendar.MINUTE, Integer.parseInt(eventTime));
intent.putExtra("endTime", cal.getTimeInMillis());
String description = pv.getDescription().trim();
intent.putExtra("title", title); // **NOT WORKING**
intent.putExtra("description", description); // **NOT WORKING**
startActivity(intent);

any idea? Thanks Sandro

EDIT: Looks like there is no TITLE and DESCRIPTION on the Intent with Honeycomb. The only way we are able to do that is using content provider, a totally different method.


try used its... http://developer.android.com/guide/topics/providers/calendar-provider.html#intent-edit

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜