[mono-android] Problem with binding of Google analytics tracker library

Petr Slováček pslovacek at newlink.cz
Wed Jun 6 21:37:37 UTC 2012


My app is based on Google MapView MapActivity and it downloads the data through a web service so it has to have the internet permission otherwise it wouldn't show a thing.

Kyle

-----Original Message-----
From: monodroid-bounces at lists.ximian.com [mailto:monodroid-bounces at lists.ximian.com] On Behalf Of Jonathan Pryor
Sent: 6. června 2012 19:59
To: Discussions related to Mono for Android
Subject: Re: [mono-android] Problem with binding of Google analytics tracker library

On Jun 6, 2012, at 11:03 AM, Petr Slováček wrote:
> This is what I get in application output window each time it tries to send the data:

Less useful than I hoped. HttpResponseParser.parseHead():

	https://github.com/android/platform_external_apache-http/blob/master/src/org/apache/http/impl/io/HttpResponseParser.java#L73

`sesionBuffer` is a SessionInputBuffer (interface), of unknown runtime type, and `sessionBuffer.readLine()` returned -1, causing the exception. Grepping libGoogleAnalytics.jar, I see no implementations of SessionInputBuffer, so I'll assume it's a AbstractSessionInputBuffer:

	https://github.com/android/platform_external_apache-http/blob/master/src/org/apache/http/impl/io/AbstractSessionInputBuffer.java#L164

This assumption may very well be wrong, but if it's right, the only way for readLine() to return -1 is for this.linebuffer.length() to be -1 (lineFromLinebuffer()), or for fillBuffer() to return -1, which could happen if the wrapped InputStream.read() returns end-of-stream.

Either way, I'm not sure why that would be happening, not if your app has the INTERNET permission (which iirc you said that your app had). Could you confirm that your app has INTERNET permission, e.g. by trying to use WebClient against a url?

> I had to add empty IDispatcherCallbacks interface to Additions folder of my java binding library project otherwise it refused to compile.

I'm guessing that this is due to #5143:

	https://bugzilla.xamarin.com/show_bug.cgi?id=5143

 - Jon

_______________________________________________
Monodroid mailing list
Monodroid at lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


More information about the Monodroid mailing list