views:

597

answers:

3

Hi everybody,

I am developing an application which requires to add Calendar event. I have written the code for inserting event to the calendar. But whenever i run my application, everytime i get error that "Fail to find provider info for Calendar" and it also throws me NullPointerException error. So, what it means and i found that emulator doesn't provide Calendar application in-built.

I think if the Android Emulator doesn't have Calender API, so, naturally, it will not have any database URI in the emulator whereas the Contact has URI --"content://contacts/people". I also found the URI for Calendar as "content://calendar/calendars" but it doesn't work and it means that it gives me error cause of missing Calendar application.

Can anybody clarify me, with suggestions regarding Calendar Event?

Which is the way to test my application with Calendar Event?

I really need your help. Please needful for the same. Thanks.

Regards,


Pranav

+2  A: 

I am developing an application which requires to add Calendar event. I have written the code for inserting event to the calendar. But whenever i run my application, everytime i get error that "Fail to find provider info for Calendar" and it also throws me NullPointerException error. So, what it means and i found that emulator doesn't provide Calendar application in-built.

Do not attempt to manipulate the Calendar content provider. That is not part of the SDK. If you need to manipulate the user's calendars, do so through the Google Calendar Data API, please.

CommonsWare
How do I assign my calendar on Emulator with a Gmail account?
Pentium10
You can set it up under the preferences.
LucaB
A: 

Hi Pentium10,

Thanks for reply me. Now i come to know that i have to test and develop Calendar Event on the real device because Calendar.apk is not installed on emulator and using the emulator will fail to launch the appropriate provider. That's why i was getting the error -- "Fail to find provider info for Calendar" and also got the NullPointerException when my cursor is started to find the existing events onto the Calendar.

If still you get any idea regarding Calendar issue, please let me know.

Thanks.

Regareds,


Pranav

Pranav
Read the StackOverFlow FAQ, you are not supposed to post answer like this. You should use the Add Comment section to reply on answers.
Pentium10
A: 

Hi ConmmonsWare,

Thanks for commenting to my topic.

Actually, there is no need of Calendar API in my application. I had gone through the link suggested by you and i knew that first i have to setup/ synchronize my email account to my device and after that i can proceed further.

But the Calendar application and content provider are available on Android handsets with Google services, such as the T-Mobile G1. So, naturally, it is not included in the emulator.

Thanks.

Regards,


Pranav

Pranav
Read the StackOverFlow FAQ, you are not supposed to post answer like this. You should use the Add Comment section to reply on answers.
Pentium10