[mono-android] SQLite null reference.

2011-09-23 Thread Mittchel Van Vliet
Hello everyone, Recently I tried to copy a database file onto my device but I'm getting some null reference exceptions for some reason.. My code: public static SqliteConnection GetConnection() { var destPath = Path.Combine( System.Environment.GetFolderPath(System.Env

Re: [mono-android] SQLite null reference.

2011-09-23 Thread Miljenko Cvjetko
Hi On 2011.09.23 12:05, Mittchel Van Vliet wrote: Hello everyone, Recently I tried to copy a database file onto my device but I'm getting some null reference exceptions for some reason.. My code: public static SqliteConnection GetConnection() { var destPath = Path

Re: [mono-android] Sharing dlls

2011-09-23 Thread Miljenko Cvjetko
Hi On 2011.09.23 08:40, Mittchel Van Vliet wrote: Hello everyone, Do you guys know if it is possible to make Library's (.dll) files with business logic like accessing the database and share this with a MonoTouch project? I thought macs didnt support .dll files so thats why I am asking.. dlls

Re: [mono-android] SQLite null reference.

2011-09-23 Thread Miljenko Cvjetko
Hi again Forgot something important, so You would not lose time: Assets get compressed if bigger than 1MB.. See http://mono-for-android.1047100.n5.nabble.com/Error-while-copying-SQLite-database-td4723722.html regards mel On 2011.09.23 12:05, Mittchel Van Vliet wrote: Hello everyone, Recentl

Re: [mono-android] cant get my head around progress bar

2011-09-23 Thread John Murray
Many tx SRI I solved it by putting the code into it's own method Viz Whilst this does not work (code in eventhandler ) t1.Text = "loading"; > > ThreadPool.QueueUserWorkItem(o > =>WXclass5.getwindmap(ds, WXclass5.altsel.ToString())); > > t1.Text = ""; This d

[mono-android] sharing violation trying to save a bitmap

2011-09-23 Thread John Murray
I cant understand what's going on here In MonoDevelop I just get an unhandled exception In Vis studio I get more of a clue as it says there's a sharing violation Weirdly stepping through in the debugger it seems to go round the loop twice (i.e. it steps down to Bitmap.compress then springs

Re: [mono-android] sharing violation trying to save a bitmap

2011-09-23 Thread SRI
Hi Are you creating multiple Threads to call saveBMP, In that case only you will see this type of jumping in code? Best Regards, Sridharan Srinivasan Alias Sri. On Fri, Sep 23, 2011 at 6:57 PM, John Murray wrote: > I cant understand what’s going on here > > In MonoDevelop I just get a

Re: [mono-android] sharing violation trying to save a bitmap

2011-09-23 Thread John Murray
Well not that I know of but I may have misunderstood There is one method which is called which = checks if the meteorological wind bitmap has already been downloaded and saved to sdcard = if it has it uses that = if not it downloads a new one and saves that (this is where the error occurs The

Re: [mono-android] SQLite null reference.

2011-09-23 Thread Jonathan Pryor
On Sep 23, 2011, at 6:20 AM, Miljenko Cvjetko wrote: > Try putting it in Assets folder and load as asset > Build action is Andorid asset!! He said he's using Embedded resource and he's using Assembly.GetManifestResourceStream(). This _should_ be fine (and works around the Android issue where

Re: [mono-android] SQLite null reference.

2011-09-23 Thread Jonathan Pryor
On Sep 23, 2011, at 6:05 AM, Mittchel Van Vliet wrote: > Recently I tried to copy a database file onto my device but I'm getting some > null reference exceptions for some reason.. What's the stack trace? Do you have the correct name in your GetManifestResourceStream() call? You may want to look

Re: [mono-android] Sharing dlls

2011-09-23 Thread Jonathan Pryor
On Sep 23, 2011, at 2:40 AM, Mittchel Van Vliet wrote: > Do you guys know if it is possible to make Library's (.dll) files with > business logic like accessing the database and share this with a MonoTouch > project? If you're careful, it is possible to share the same assembly between MonoTouch

Re: [mono-android] Custom attribute

2011-09-23 Thread Jonathan Pryor
On Sep 22, 2011, at 6:42 PM, El-Sayed Mohamed wrote: > How to set custom attribute from axml? You should be able to use the IAttributeSet methods; untested... > //Code snippet is below > > public class CustomView : ViewGroup > { > public string DisplayText > { >

Re: [mono-android] How to set the application name

2011-09-23 Thread Jonathan Pryor
On Sep 22, 2011, at 7:56 AM, Greg Shackles wrote: > To set application attributes you can extend the Application class and use > the attribute there, something like: You don't need to extend the Android.App.Application class; it's also usable as an assembly level attribute: [assembly:An

Re: [mono-android] Stacktrace: dumps and freezing

2011-09-23 Thread Jonathan Pryor
On Sep 22, 2011, at 8:19 AM, Andrew Sinclair wrote: > With 1.2.0 I'm seeing various mono "Stacktrace:" dumps in the adb log during > quite long running operations (eg. within a background thread 6000 downloaded > records into a sync over HTTP). We're not sure why you're getting this. :-( Please

Re: [mono-android] Custom attribute

2011-09-23 Thread El-Sayed Mohamed
First, thank you JP for your reply. Your proposed solution is working, but this is not what I want. I want to set the attribute from axml the same way I set built-in atrributes. EX: In the above example, in VS I have code completion within the editor for attributes under the android namespace. H

Re: [mono-android] Custom attribute

2011-09-23 Thread Jonathan Pobst
You would have to modify the schemas that we ship. In C:\Program Files (x86)\MSBuild\Novell, there is: - android-layout-xml.xsd - schemas.android.com.apk.res.android.xsd Note these will get overwritten every time you upgrade Mono for Android, so I doubt this is a very viable solution. Jonathan

Re: [mono-android] SQLite null reference.

2011-09-23 Thread Mittchel Van Vliet
Where can I find the stack trace? Because I can't seem to find it anywhere.. And how do I know what the name is in the ManifestResourceStream? I thought it was items.db3.. And I'm really new with this stuff so I've got no idea what you mean with /resource CSC options :p 2011/9/23 Jonathan Pryor

Re: [mono-android] Sharing dlls

2011-09-23 Thread Mittchel Van Vliet
But how am I supposed to do that? Just like create 2 type of Library projects? 1 mono for android and 1 monotouch? 2011/9/23 Jonathan Pryor > On Sep 23, 2011, at 2:40 AM, Mittchel Van Vliet wrote: > > Do you guys know if it is possible to make Library's (.dll) files with > business logic like ac

Re: [mono-android] ApiDemo error + debugging problems

2011-09-23 Thread Jonathan Pryor
On Sep 21, 2011, at 8:55 AM, Miljenko Cvjetko wrote: > ApiDemo.cs gets exception on line 84 > list = list.OrderBy (p => (p.ActivityInfo.NonLocalizedLabel == null ? "" : > p.ActivityInfo.NonLocalizedLabel.ToString ()).ToString ()).ToList (); ... > 09-21 12:36:47.620 E/dalvikvm( 519): Excessive JNI

Re: [mono-android] Sharing dlls

2011-09-23 Thread Jonathan Pryor
On Sep 23, 2011, at 3:31 PM, Mittchel Van Vliet wrote: > But how am I supposed to do that? Just like create 2 type of Library > projects? 1 mono for android and 1 monotouch? See the project. :-) What I did was I had a MonoTouch Library project spit out an assembly into some Well Known directory

Re: [mono-android] SQLite null reference.

2011-09-23 Thread Jonathan Pryor
On Sep 23, 2011, at 3:30 PM, Mittchel Van Vliet wrote: > Where can I find the stack trace? Because I can't seem to find it anywhere.. Hopefully `adb logcat`. How do you know that it's a NullReferenceException if you don't get a stack trace? > And how do I know what the name is in the ManifestRe

[mono-android] Can not run Hello world monodrois sample on my device

2011-09-23 Thread fish55
Helo.apk and Hello-signed.apk (by vs2010 monodroid)(default monodroid app from template I have lg android2.2 phone and i load by usb to my phone those files. When i run it i see "Unexpected error process Hello.apk") In emulator device application works fine Mycompilation config-debug all cpu S

Re: [mono-android] Can not run Hello world monodrois sample on my device

2011-09-23 Thread Jonathan Pryor
On Sep 23, 2011, at 5:05 PM, fish55 wrote: > p.s i am using trial version of monodroid The trial version of monodroid will only run on the emulator, not on actual hardware. - Jon ___ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFO

[mono-android] Weird Error when invoking Service

2011-09-23 Thread mcgear
I am getting a weird error when i invoke a service. This does not happen all the time, but happens very infrequently. I havn't been able to isolate a scenario that causes it... The code that i believe causes the occasional exception is when i invoke a method on the client object from an added