0

I would like to use Calendar by programming in honeycomb emulator. However, there is no calendar in the emulator. Therefore, I cannot write a program which uses Calendar to add or edit an event. I synchronized a gmail account and the emulator got synchronized with my contacts and e-mail but not my calendar. Also, I tried to add a Calendar.apk which I found somewhere to the emulator but I did not make it. Question is that how can I use Calendar in an emulator in Andorid 3.1?

Thanks in advance.

Onur Demir
  • 708
  • 2
  • 13
  • 35

1 Answers1

0

There is no documented and supported API for working with the Calendar in Android 3.1. Such an API was added in Android 4.0. I expect that most Android devices running Android 3.1 will be upgraded to Android 4.x. Hence, I suggest that you simply use the new supported API with an Android 4.0 emulator.

For more on the change in status in the Calendar API, please read this blog post.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • I know that Android 4.0 supports this API. However, I am working a huge project working on Android 3.1 and I must work with the emulator. Hence, I should find a way to work on Android 3.1 with the Calendar. Also, everyone says that there is no API for calendar but I can reach the calendar by using the Calendar's Uri that is "content://calendar/calendars". Moreover, I can add events by using ContentResolver's 'insert' function with that Uri . Am I missing something? – Onur Demir Nov 02 '11 at 14:40
  • @AOD: Please read the blog post. As noted there, `content://calendar/calendars` is not supported and never has been, and it is unreliable. Google has said repeatedly throughout the years that you should not be using that. Furthermore, you have admitted to pirating the Calendar.apk file. There is no authorized means of having the Calendar in an Android emulator before Android 4.0 (and there are some indications that it doesn't work that well in 4.0 either -- I haven't tried it personally yet). – CommonsWare Nov 02 '11 at 14:47
  • I could not get it that you say there was no authorized means of having the Calendar in an Android emulator.I compiled the android sources and make the Calendar from those sources and then tried to install to the emulator.Then how could I have done pirating?Also in the blog you post it says:"We’re not claiming that they’re “Private” or “Secret” —How could they be,when anyone in the world can discover them?".My aim is not to discuss but to learn;). Anyway, I got the message that if I use low level unsupported API for calendar, my code can be broken while platform updates are being done. Thanks. – Onur Demir Nov 02 '11 at 15:20
  • @AOD: "I compiled the android sources and make the Calendar from those sources and then tried to install to the emulator." -- my apologies. However, that won't work AFAIK, you can only use that APK as part of a firmware installation, not installed separately. – CommonsWare Nov 02 '11 at 15:25