Re: [mono-android] 1.9.2 Packaging - InvalidCastException
Hello, I had the same problem. In my case I added in the AndroidManifest.xml file attributes of the application like Label, Logo. However, I also implemented that information as attributes of my application class and that is the problem (twice the same attributes). So I am removed the attributes in the AndroidManifext.xml file, but you can also remove the attributes of the application class instead in the xml file, both works. Best Andi -- View this message in context: http://mono-for-android.1047100.n5.nabble.com/1-9-2-Packaging-InvalidCastException-tp4947754p4948331.html Sent from the Mono for Android mailing list archive at Nabble.com. ___ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
Re: [mono-android] Mono for Android 1.9.2 Preview Released
You guys should have more focus on fix existent bugs before implement new features. 2011/10/29 El-Sayed Mohamed > Cong. to the M4A team for this new release. > > One question: Can we bind arbitray java lib with this release?. > > Thanks, > El-Sayed > > > Date: Thu, 27 Oct 2011 15:02:36 -0500 > > From: jpo...@xamarin.com > > To: Monodroid@lists.ximian.com > > Subject: [mono-android] Mono for Android 1.9.2 Preview Released > > > > > Good News Everyone! > > > > We are happy to announce a new preview release of Mono for Android > > including, among other things, Google Maps and Ice Cream Sandwich > bindings! > > > > We are doing the 1.9 series as a beta for 2.0. This is because there > > are several big changes going on that need wider testing and feedback. > > > > These changes are: > > - Google Maps bindings > > - Ice Cream Sandwich support > > > > Instructions for downloading (and reverting if needed) are available on > > the release notes: > > > > http://android.xamarin.com/Releases/Mono_for_Android_1/Release_1.9.2 > > > > If you are feeling adventurous, try 1.9.2 out and file bugs for any > > regressions or new bugs you come across. > > > > Enjoy! > > Jonathan Pobst > > ___ > > Monodroid mailing list > > Monodroid@lists.ximian.com > > > > UNSUBSCRIBE INFORMATION: > > http://lists.ximian.com/mailman/listinfo/monodroid > > ___ > Monodroid mailing list > Monodroid@lists.ximian.com > > UNSUBSCRIBE INFORMATION: > http://lists.ximian.com/mailman/listinfo/monodroid > > ___ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
[mono-android] using Google docs from mandroid
I am exploring using Google docs from my mandroid app - I'm in the process of reading around and experimenting Can anyone give me some help on these - sorry about the dumb nature of some questions 1) I presume one can't use the Google .net libraries in Mandroid as they seem to be windows dll's ? or have it got that wrong? 2) Therefore one would use a web request or webclient I'm happily using a webclient to post xml, get a stream back and turn it into bitmaps using a weather service so I have some familiarity here - I tried using the same sort of approach with Google but can't get past the authorisation- Am I banging my head against a brick wall here? Should it be possible to authorise and download using webclient.UploadData(url,"POST",arrayofheaders) ? or should one be using a webrequest() - not sure I understand the subtleties. 3) I am confused by the google documentation about authorisation - it seems to have several ways of doing it - I'm trying to keep it simple with just a client login but even in the documentation this bangs on a about a 'captcha' response = all serving to confuse 4) I can find endless examples of python and php connecting to Googledocs and even a few iOs examples but none very helpful unless you understand those languages and as usual most of them are buried under layers of abstraction. Can anyone suggest some reading which might be more appropriate to c# and mandroid? Or has anyone done this and has some few lines of code for something as simple as getting a list of available files? I find I learn mostly by example TIA John M ___ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
Re: [mono-android] Mono for Android 1.9.2 Preview Released
On Oct 29, 2011, at 5:17 AM, gabriel.b...@gmail.com wrote: > You guys should have more focus on fix existent bugs before implement new > features. Existing "bug": No Honeycomb support, no ICS support. Pretty much identical to the "how do we bind 3rd party .jar files" question. Fixed. (Mostly.) Previously Mono for Android's GC mechanism would rely upon JNIEnv::GetObjectRefType(), which was documented as not working reliably (prior to ICS). Probably responsible for JNI warnings about deleting the wrong kind of reference. Fixed in 1.9.2 (and responsible for the JniHandleOwnership-related change). Binding bug when dealing with rectangular array parameters. Fixed in 1.9.1. We're fixing lots of existing bugs while implementing the new features, especially since many of the "new features" depend upon fixing bugs at the same time. Sometimes the fixes regress things, such as View.ItemLongClick becoming a property from an event, which will be fixed in the future. In short, we're not doing all features, all the time. :-) - Jon ___ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
[mono-android] Will System.Configuration.dll be imported?
I'm work on port the microsoft.prims to MonoDroid, but I can't find System.Configuration.dll, will it be implemented on the platform of Mono for Android? Thanks Frank -- View this message in context: http://mono-for-android.1047100.n5.nabble.com/Will-System-Configuration-dll-be-imported-tp4948856p4948856.html Sent from the Mono for Android mailing list archive at Nabble.com. ___ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
Re: [mono-android] Will System.Configuration.dll be imported?
On Oct 29, 2011, at 11:26 AM, cb wrote: > I'm work on port the microsoft.prims to MonoDroid, but I can't find > System.Configuration.dll, will it be implemented on the platform of Mono for > Android? No. We based the profile on Silverlight, which lacks the System.Configuration namespace, and we haven't seen any reason to add it back (as we have with other namespaces). Add in the fact that you don't have .exe's but .dll's in Mono for Android, and System.Configuration doesn't work with .dll's... I don't see much point to adding it back. - Jon ___ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
Re: [mono-android] using Google docs from mandroid
Just out of curiosity - as my general newbie/needy post (see below) is not attracting much attentionL Is one supposed to be able to compile the Google.Gdata libraries into a Mandroid app? I've got what I want to do happening in a winform app I've ported same code into an M-Android app and put in same references Whooopee it compiles Even runs fine but whilst I can step through the preliminary process (giving it credentials etc) everything seems fine until I fire the key line Feed feed = this.request.GetEverything(); I cant see whats returned - i've tried testing for null, try/catch etc but whilst it seems to perform and move to next piece of code, as soon as you try to look at 'feed' even in a watch then mono falls over with code 255. This is in vs2010 - currently I've had MD 2.8.1 falling over every five seconds with unhandleds - System.NullReferenceException: Object reference not set to an instance of an object. at MonoDevelop.Ide.Gui.BackgroundProgressMonitor.<>c__DisplayClass5.b__4(Object , EventArgs ) at Gtk.Application.InvokeCB.Invoke() at GLib.Timeout.TimeoutProxy.Handler() hangs the whole show and you have to reboot to get rid of the monodevelop splash screen I've reinstalled and it seems OK on my normal apps but it wont go near this one - falls over as soon as I try to run it. So once again - am I wasting my time on this - are the gdata dll's not supposed to work with mono ? Is that the cause of the grief? and do I have to go back to using a webrequest or something like that TIA for any pointer whatsoever John M From: monodroid-boun...@lists.ximian.com [mailto:monodroid-boun...@lists.ximian.com] On Behalf Of John Murray Sent: 29 October 2011 13:28 To: 'Discussions related to Mono for Android' Subject: [mono-android] using Google docs from mandroid I am exploring using Google docs from my mandroid app - I'm in the process of reading around and experimenting Can anyone give me some help on these - sorry about the dumb nature of some questions 1) I presume one can't use the Google .net libraries in Mandroid as they seem to be windows dll's ? or have it got that wrong? 2) Therefore one would use a web request or webclient I'm happily using a webclient to post xml, get a stream back and turn it into bitmaps using a weather service so I have some familiarity here - I tried using the same sort of approach with Google but can't get past the authorisation- Am I banging my head against a brick wall here? Should it be possible to authorise and download using webclient.UploadData(url,"POST",arrayofheaders) ? or should one be using a webrequest() - not sure I understand the subtleties. 3) I am confused by the google documentation about authorisation - it seems to have several ways of doing it - I'm trying to keep it simple with just a client login but even in the documentation this bangs on a about a 'captcha' response = all serving to confuse 4) I can find endless examples of python and php connecting to Googledocs and even a few iOs examples but none very helpful unless you understand those languages and as usual most of them are buried under layers of abstraction. Can anyone suggest some reading which might be more appropriate to c# and mandroid? Or has anyone done this and has some few lines of code for something as simple as getting a list of available files? I find I learn mostly by example TIA John M ___ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
Re: [mono-android] How can I ckeck if an enventhandler is already attached ?
You can also always unsubscribe then subscribe... as unsubscribe will do nothing if its not yet registered Le 28 oct. 2011 20:47, "Jonathan Pryor" a écrit : > On Oct 27, 2011, at 12:01 PM, bmellac wrote: > > I have buttons in ListViewItems, so in my Adapter.GetView(...), I have to > > wire eventhandler for the .Click methods of my buttons : > > convertView.FindViewById(Resource.Id.art_qte_minus).Click += new > > EventHandler(art_qte_minus_Click); > ... > > So how can I check if there is an already attached eventhandler ? > > Short answer: you don't. > > Slightly longer answer: where is your convertView coming from? :-) > > Normally you're using LayoutInflator.Inflate() to create a new View, so > only register the event when you create: > >public override View GetView (int position, View convertView, > ViewGroup parent) >{ >if (convertView == null) { >var inflator = (LayoutInflater) > Context.GetSystemService (Context.LayoutInflaterService); >convertView = inflator.Inflate (resourceId, null); > > convertView.FindViewById(Resource.Id.art_qte_minus).Click += > art_qte_minus_Click; >} >// ... >} > > > By the way, I'd like to use a ViewHolder to be clean, but I can't find > the > > corresponding class in c#. > > I'm not sure what type you're referring to. A web search for "ViewHolder > site:android.com" finds: > > > http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/List14.html > > in which ViewHolder is: > >static class ViewHolder { >TextView text; >ImageView icon; >} > > so this appears to be a design pattern rather than a concrete type, and the > C# equivalent would be: > >class ViewHolder : Java.Lang.Object { >public TextView Text {get; set;} >public ImageView Icon {get; set; } >} > > - Jon > > ___ > Monodroid mailing list > Monodroid@lists.ximian.com > > UNSUBSCRIBE INFORMATION: > http://lists.ximian.com/mailman/listinfo/monodroid > ___ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
Re: [mono-android] 1.9.2 Packaging - InvalidCastException
I went through and verified that I didn't have any duplication between my manifest and any attributes for my application but I'm still seeing the same behavior. I even tried removing the application element from my manifest entirely, but I still receive the same exception. I'll probably go back to 1.9.1 for the time being, although I was looking forward to the Maps integration... -- View this message in context: http://mono-for-android.1047100.n5.nabble.com/1-9-2-Packaging-InvalidCastException-tp4947754p4949143.html Sent from the Mono for Android mailing list archive at Nabble.com. ___ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
Re: [mono-android] 1.9.2 Packaging - InvalidCastException
It's going to have something to do with one of the following attributes: [Register] [Activity] [Application] [Service] [BroadcastReceiver] [ContentProvider] Without seeing any code or test case, I don't think I can tell exactly what the issue is, but maybe you can try commenting out usage of these attributes in your app to narrow down which one is causing a problem. Hope this helps! Jonathan On 10/29/2011 2:06 PM, mkowalski wrote: > I went through and verified that I didn't have any duplication between my > manifest and any attributes for my application but I'm still seeing the same > behavior. I even tried removing the application element from my manifest > entirely, but I still receive the same exception. I'll probably go back to > 1.9.1 for the time being, although I was looking forward to the Maps > integration... > > > > -- > View this message in context: > http://mono-for-android.1047100.n5.nabble.com/1-9-2-Packaging-InvalidCastException-tp4947754p4949143.html > Sent from the Mono for Android mailing list archive at Nabble.com. > ___ > Monodroid mailing list > Monodroid@lists.ximian.com > > UNSUBSCRIBE INFORMATION: > http://lists.ximian.com/mailman/listinfo/monodroid > > ___ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
[mono-android] Running Devices
This cost me an hour so, just wanted to share. Steps to setup debugging on the device. 1. On your android, go to: Settings --> Applications --> Development 2. Enable "USB debugging" 3. Connect your phone by USB 4. Connect your phone to your wi-fi network 5. CONFIRM CONNECTIVITY. A. From the DOS prompt, run "adb devices". If the "adb.exe" is not in your path, find it in the android-sdk platform-tools and add it to your path. B. If your physical device is not listed in the output of "adb devices", forget about monodroid. You must get your device listed here before moving forward. This information is listed in various threads, but it took me a while to piece together. Hopefully this helps someone. -- View this message in context: http://mono-for-android.1047100.n5.nabble.com/Running-Devices-tp4949272p4949272.html Sent from the Mono for Android mailing list archive at Nabble.com. ___ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
Re: [mono-android] 1.9.2 Packaging - InvalidCastException
Thanks for your reply - I had forgotten to check my ContentProvider attribute and it turns out that one was the issue. I moved the information from the attribute to the manifest and everything is working again. Did anything change with respect to that attribute? -- View this message in context: http://mono-for-android.1047100.n5.nabble.com/1-9-2-Packaging-InvalidCastException-tp4947754p4949310.html Sent from the Mono for Android mailing list archive at Nabble.com. ___ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
Re: [mono-android] 1.9.2 Packaging - InvalidCastException
Not to my knowledge. Could you share what your [ContentProvider] was so we can investigate it? Thanks! Jonathan On 10/29/2011 4:10 PM, mkowalski wrote: > Thanks for your reply - I had forgotten to check my ContentProvider attribute > and it turns out that one was the issue. I moved the information from the > attribute to the manifest and everything is working again. Did anything > change with respect to that attribute? > > -- > View this message in context: > http://mono-for-android.1047100.n5.nabble.com/1-9-2-Packaging-InvalidCastException-tp4947754p4949310.html > Sent from the Mono for Android mailing list archive at Nabble.com. > ___ > Monodroid mailing list > Monodroid@lists.ximian.com > > UNSUBSCRIBE INFORMATION: > http://lists.ximian.com/mailman/listinfo/monodroid > > ___ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
Re: [mono-android] 1.9.2 Packaging - InvalidCastException
Sure thing - here it is: [ContentProvider(new[] { Constants.AUTHORITY }, Label = "@string/ContentProviderName")] -- View this message in context: http://mono-for-android.1047100.n5.nabble.com/1-9-2-Packaging-InvalidCastException-tp4947754p4949349.html Sent from the Mono for Android mailing list archive at Nabble.com. ___ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
Re: [mono-android] 1.9.2 Packaging - InvalidCastException
Thanks, we'll try to guard against this error. Try this: [ContentProvider(new string[] { Constants.AUTHORITY }, Label = "@string/ContentProviderName")] ie: new string[] instead of new[] Jonathan On 10/29/2011 4:52 PM, mkowalski wrote: > Sure thing - here it is: > > [ContentProvider(new[] { Constants.AUTHORITY }, Label = > "@string/ContentProviderName")] > > -- > View this message in context: > http://mono-for-android.1047100.n5.nabble.com/1-9-2-Packaging-InvalidCastException-tp4947754p4949349.html > Sent from the Mono for Android mailing list archive at Nabble.com. > ___ > Monodroid mailing list > Monodroid@lists.ximian.com > > UNSUBSCRIBE INFORMATION: > http://lists.ximian.com/mailman/listinfo/monodroid > > ___ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
Re: [mono-android] 1.9.2 Packaging - InvalidCastException
That produced the same exception =/ -- View this message in context: http://mono-for-android.1047100.n5.nabble.com/1-9-2-Packaging-InvalidCastException-tp4947754p4949375.html Sent from the Mono for Android mailing list archive at Nabble.com. ___ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
[mono-android] Intent.ExtraStream and Intent.ActionSendMultiple
Just started with MonoAndroid. First post. I have created and Activity that listens for Intent.ActionSendMultiple. When the message arrives the Bundle.Extra does have the two URIs of the items I selected from the picture gallery. I can see the data in the debugger. The type of the ExtraSteam is JavaObject. No matter what cast the result to its always null - except if i get it as a string. What is the type in the case of Intent.ActionSendMultiple? if (this.Intent.Action == Intent.ActionSendMultiple) { if (this.Intent.HasExtra(Intent.ExtraStream)) { Bundle b = this.Intent.Extras; if (!b.IsEmpty) { foreach(string str in list2) { object o = b.Get(str); } } -- View this message in context: http://mono-for-android.1047100.n5.nabble.com/Intent-ExtraStream-and-Intent-ActionSendMultiple-tp4949575p4949575.html Sent from the Mono for Android mailing list archive at Nabble.com. ___ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
[mono-android] Put application on "send via" not "share via"
Thanks in advance for your help. I have created an application that successfully gets listed in the "share via" menu in the picture gallery. I really want it to show up in the "send via" where Bluetooth/Email/etc are. Is it possible? What is the diff? Steve -- View this message in context: http://mono-for-android.1047100.n5.nabble.com/Put-application-on-send-via-not-share-via-tp4949577p4949577.html Sent from the Mono for Android mailing list archive at Nabble.com. ___ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid