On 05/25/10 03:34, Andreas Streim wrote:
> Hi everybody,
>
> my app uses the internal calendar via the not officially, but in some
> articles on the web mentioned methods. So I have some lines to read
> all available calendars:
>
> String[] projection = new String[] { "_id", "displayName" };
> Uri calendars = Uri.parse("content://calendar/calendars");
> Cursor managedCursor = act.managedQuery(calendars,
> projection,"access_level>300", null, null); /* "selected" */
> if (managedCursor.moveToFirst()) {
> etc.
>
> It works well with Android 1.5 to 2.1, but since Froyo there seems to
> be a problem. A Nexus user with Froyo gets force close and sent me a
> log with this line:
>
> 05-24 18:55:04.308 E/AndroidRuntime( 1467): Caused by:
> java.lang.NullPointerException
> 05-24 18:55:04.308 E/AndroidRuntime( 1467): at
> streim.de.quickaddroid.MeinKalender.init(MeinKalender.java:27)
>
> that's the if-line.
>
> Can anybody give me a hint what Google has changed to the calendar since 2.1?
>
> I know the method to access the calendar was never official, but there
> was no alternative. And it's not a good user experience, when apps you
> have used before stopped working. And the (hobby) programmer cannot do
> anything, because calendar is not part of the SDK and I don't have a
> Nexus :-(
>
> Greetings,
> Andreas
>
>   
This is why Google begs, pleads and cajoles you not to use unpublished
APIs-- they will change without notice, which creates a bad user
experience and poisons perceptions of the whole platform.  When you use
an unpublished API, you are hurting every Android developer.

Google /needs/ to be able to change some things to move the platform
forward, and stuff that is undocumented is what they change.

If you can't find another way to get the functionality of an unpublished
API, the correct answer is to file a bug in the bug list requesting that
the functionality be officially provided.

>From your description, it sounds like Google probably saw the app's
ability to access the calendar without going through the account log-in
page as a security flaw, and closed it.


-- 
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