My app wants to whisk the user to the "create new event" composition
window of his Calendar app, initializing begin time, end time, title
and description text for the event, but then leaving him able to see
these values and optionally alter them before saving (or discarding)
the event using the oridinary means available to him from within the
Calendar's create new event activity.

HOWEVER...

My code which works dandy on my own dev phone (indeed, on any phone
running stock Android Calendar to the bone) fails on the HTC Hero.
The issue is that the Hero has been "improved" by use of a non-
standard Calendar app and my means of doing this is therefore failing.

I wonder if someone can outline a more generic means I can use to say
"tell whatever the user's preferred Calendar app is to create a new
event, seeding the effort with these key/value pairs".

Here is my present code:

        Intent intent = new Intent(Intent.ACTION_INSERT) ;

        // the HTC anti-Hero does not have a class named
"com.android.calendar.EditEvent" :(
        intent.setClassName
("com.android.calendar","com.android.calendar.EditEvent");

        intent.putExtra("beginTime", calObject.getTimeInMillis());
        // make it 15 minutes duration
        intent.putExtra("endTime", calObject.getTimeInMillis() + (1000 * 60 *
15));

        intent.putExtra("title", "dentist appointment");
        intent.putExtra("description", "this would be the additional text
describing the event");


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to