Re: [mono-android] Available images list is empty on starting emulator dialog

2012-02-03 Thread Mike Child
After you install all the sdk software you still need to create an
emulator image to use. Go to the following link and towards the bottom
it shows how to create a emulator device...
http://docs.xamarin.com/android/getting_started/installation/Installation_for_Windows

Mike Child



On Fri, Feb 3, 2012 at 4:49 AM, Daní  wrote:
> Hi,
>
> I'm really newbie on monodroid development. I just download the trial
> version and want to try the environment. I'm developping with Visual Studio
> 2010 on a Windows 7 x64 pc.
>
> First thing I'm trying to do is to execute the default monodroid
> application. So, I created a new Mono for Android application in Visual
> Studio and pressed F5 key. After that, it appears a dialog, "Select device"
> that prompts to select the device. This dialog shows and empty lisy and
> below it appears a link, "Start emulator image"; pressing the link takes me
> to another similar dialog, "Start Emulator" with an, again, empty list of
> availbale images, below the empty list it appers to links: "Refres images"
> and "Create new emulator image", pressing the first one does not produce any
> result; pressing the second one, "Create new emulator image" takes me to the
> Android SDK manager. I have already installed all the packages availables on
> the SDK manager, but still, I can't see any emulator image.
>
> Please, any help to start running monodriod app on emulator images?
>
> Thanks
>
> Daní
>
> --
> View this message in context: 
> http://mono-for-android.1047100.n5.nabble.com/Available-images-list-is-empty-on-starting-emulator-dialog-tp5453306p5453306.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] Using a webservice

2012-03-25 Thread Mike Child
Are you using a Samsung device? If so, what version of Android OS?
On Mar 24, 2012 8:37 AM, "Paul Johnson"  wrote:

> Hi,
>
>  Is logcat enabled on the physical device? My app works fine on the
>>> emulator, not a physical device
>>>
>>
>> Yes, logcat is available on both emulators and physical devices.
>>
>
> Thanks for that.
>
> Logcat is showing something odd on the device which isn't showing on the
> emulator...
>
> (this is a slightly shortened version as the stuff before this was just
> debug from every other process going)
>
> 8-->
> I/monodroid-gc(  618): environment supports jni NewWeakGlobalRef
> D/PowerManagerService( 2711): onSensorChanged: light value: 1
> I/AudioFlinger( 2599): stop output streamType (0, 1) for 1
> W/WindowManager( 2711): Window Window{40995cf8 com.sec.android.app.**
> twlauncher/com.sec.android.**app.twlauncher.Launcher paused=false}
> destroyed surface Surface(name=com.sec.android.**app.twlauncher/com.sec.**
> android.app.twlauncher.**Launcher, identity=-1, mNativeSurface=0),
> session Session{409daca8 uid 10029}
> W/WindowManager( 2711): Window Window{40a6af28 SurfaceView paused=false}
> destroyed surface Surface(name=SurfaceView, identity=-1, mNativeSurface=0),
> session Session{409daca8 uid 10029}
> D/GlassLockScreenMusicWidget( 2711): handleStopMarquee()
> D/dalvikvm(  618): GC_EXTERNAL_ALLOC freed 52K, 50% free 2742K/5379K,
> external 0K/0K, paused 16ms
> D/dalvikvm(  618): GC_EXTERNAL_ALLOC freed 1K, 50% free 2742K/5379K,
> external 1K/513K, paused 16ms
> I/Kineto::main(15902): WCMGetLinkMetricsCbk iRSSI:-50
> E/KINETO  (15902): KLOG004- IPA_LinkMetric: -50 -49 0 0 0 0x00
> E/KINETO  (15902): KLOG0B4- IPA_ZoneMetric: 8 8 -49 -75 -85 1 0x001 0 0
> D/dalvikvm(  618): GC_EXTERNAL_ALLOC freed <1K, 50% free 2742K/5379K,
> external 1751K/2263K, paused 15ms
> E/yamaha::media::Parameters( 2599): SalesCode = ORA
> D/dalvikvm(  618): GC_EXTERNAL_ALLOC freed 8K, 49% free 2769K/5379K,
> external 2468K/2494K, paused 16ms
> I/WindowOrientationListener( 2711): orientation = 359.98334 Tilt =
> 37.463734 -- 0 ,  8 ,  6
> I/mono-stdout(  618): xs = 432
> I/mono-stdout(  618): 90% width = 432, xAcross = 480
> I/WindowManager( 2711):   CREATE SURFACE 
> Surface(name=oqhra.android/**oqhra_android.oqhra_android,
> identity=363, mNativeSurface=0) IN SESSION 
> android.view.SurfaceSession@**409e5d50:
> pid=618 format=-1 flags=0x0 / Window{40a0e330 oqhra.android/oqhra_android.
> **oqhra_android paused=false}
> D/CLIPBOARD( 2948): Hide Clipboard dialog at Starting input: finished by
> someone else... !
> I/WindowOrientationListener( 2711): orientation = 358.84888 Tilt =
> 37.529194 -- 0 ,  7 ,  5
> I/ActivityManager( 2711): Displayed 
> oqhra.android/oqhra_android.**oqhra_android:
> +1s47ms
> D/CLIPBOARD(  618): Hide Clipboard dialog at Starting input: finished by
> someone else... !
> I/GLThread( 2948): onPause tid=19
> I/Main thread( 2948): onPause waiting for mPaused.
> I/GLThread( 2948): mPaused is now true tid=19
> W/WindowManager( 2711): Window Window{4056c560 Starting oqhra.android
> paused=false} destroyed surface Surface(name=Starting oqhra.android,
> identity=-1, mNativeSurface=0), session Session{409c84f0 uid 1000}
> D/PowerManagerService( 2711): onSensorChanged: light value: 1
> W/PowerManagerService( 2711): Timer 0x7->0x3|0x0
> E/lights  ( 2711): write_int: path 
> /sys/devices/virtual/misc/**melfas_touchkey/brightness,
> value 2
> I/PowerManagerService( 2711): Ulight 7->3|0
> D/PowerManagerService( 2711): setLightBrightness : mButtonLight : 0
> I/WifiService( 2711): pre-persistedWifiState is 1
> I/WifiService( 2711): isAirplaneModeOn is 0
> I/WindowOrientationListener( 2711): orientation = 359.0468 Tilt = 28.39012
> -- 0 ,  8 ,  4
> E/BatteryService( 2711): TMU status = 0
> D/BatteryService( 2711): update start
> D/BatteryService( 2711): updateBattery level:57 scale:100 status:2
> health:2 present:true voltage: 3907 temperature: 290 technology: Li-ion AC
> powered:false USB powered:true icon:17302233
> D/PhoneUtils( 2892): updateRAFT() : FactoryMode : false
> I/WifiService( 2711): pre-persistedWifiState is 1
> I/StatusBarPolicy( 2861): BAT. S:2 H:2
> I/WifiService( 2711): isAirplaneModeOn is 0
> I/WindowOrientationListener( 2711): orientation = 1.6021729 Tilt =
> 25.242617 -- 0 ,  9 ,  4
> I/ALSAModule( 2599): Terminated ALSA PLAYBACK device hifi
> D/PowerManagerService( 2711): onSensorChanged: light value: 1
> E/yamaha::media::Parameters( 2599): SalesCode = ORA
> I/WindowOrientationListener( 2711): orientation = 358.9167 Tilt =
> 30.459404 -- 0 ,  8 ,  5
> V/WifiMonitor( 2711): Event [ SCAN-RESULTS ]
> I/Kineto::wifi(15902): onReceive Enter
> I/Kineto::wifi(15902): onReceive SCANNING
> I/Kineto::main(15902): Kineto: HandleWifiChangeStatus val: 5
> I/Kineto::main(15902): Kineto: Wifiscanning
> I/wpa_supplicant(32463): SCAN_RESULTS : [1]
> I/wpa_supplicant(32463): SCAN_RESULTS : [1]
> I/wpa_supplicant(32463): SCAN_RESULTS : [1]
> I/Kineto::wifi(15902): onReceive Exit
>

Re: [mono-android] howto install / move apk on sdcard

2012-06-18 Thread Mike Child
I believe it is because of this.android:minSdkVersion="7"  Install
to SD wasn't added until API 8(I think). I know it didn't exist in 7.
Mike Child


On Mon, Jun 18, 2012 at 8:26 AM, michelw  wrote:
> Hello,
>
> my application doesn't have the option "move to sdcard" after installation..
>
> i put android:installLocation="preferExternal" in my AndroidManifest.xml..
>
> (  )
> Monodroid version 4.2.3
>
> i forget something?
>
> Regards
> ___
> 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] Error while retreiving data from xml file

2013-02-23 Thread Mike Child
As mentioned previously, please provide the actual error message. It's hard
to help without knowing the problem.
On Feb 23, 2013 1:20 AM, "krish"  wrote:

> ha,i changed the code ...i closed the FileStream
> even though it is giving error at same line
>   xmldoc.Load(fs);
> here is my modified code:
> private void retrvXml()
> {
> string path =
>
> System.IO.Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments),
> "Emp7.xml");
> //throw new NotImplementedException();
> XmlDataDocument xmldoc = new XmlDataDocument();
> XmlNodeList xmlnode;
> int i = 0;
> string str=null ;
>// XmlReader reader= XmlReader.Create(path);
> FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
> xmldoc.Load(fs);
> xmlnode = xmldoc.GetElementsByTagName("Item");
> for (i = 0; i <= xmlnode.Count - 1; i++)
> {
> xmlnode[i].ChildNodes.Item(0).InnerText.Trim();
> str = xmlnode[i].ChildNodes.Item(0).InnerText.Trim() + " | " +
> xmlnode[i].ChildNodes.Item(1).InnerText.Trim() + " | " +
> xmlnode[i].ChildNodes.Item(2).InnerText.Trim();
> text.Text = str;
> }
>fs.Close();   //here i closed the FileStream
>}
> here i closed the FileStream even though i m getting error...i also tried
> to
> put Closing FileStream in for loop like..
>
>
> for (i = 0; i <= xmlnode.Count - 1; i++)
> {
> xmlnode[i].ChildNodes.Item(0).InnerText.Trim();
> str = xmlnode[i].ChildNodes.Item(0).InnerText.Trim() + " | " +
> xmlnode[i].ChildNodes.Item(1).InnerText.Trim() + " | " +
> xmlnode[i].ChildNodes.Item(2).InnerText.Trim();
> text.Text = str;
> fs.Close();
> }
>
> even though i m  getting error at xmldoc.Load(fs);plz tell me the
> solution as early as possible...
>
>
>
> --
> View this message in context:
> http://mono-for-android.1047100.n5.nabble.com/Error-while-retreiving-data-from-xml-file-tp5712920p5712925.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] Newbie: How To start new Activity

2011-05-11 Thread Mike Child
This works for me.

StartActivity(typeof(AddActivity));

Mike Child


On Wed, May 11, 2011 at 4:35 PM, G. Völkl  wrote:

> Hi,
>
>
>
> in MainActivity I want to start AddActivity:
>
>
>
> Intent intent = new Intent();
>
> intent.SetClassName(this, "AddActivity");
>
> StartActivity(intent);
>
>
>
> Nothing happens.
>
>
>
> [Activity(Label = "AddActivity")]
>
> public class AddActivity : Activity
>
> {
>
> protected override void OnCreate(Bundle bundle)
>
> {
>
> base.OnCreate(bundle);
>
>  var tv = new TextView(this);
>
> tv.Text = "Hallo Welt!";
>
>  SetContentView(tv);
>
> //SetContentView(Resource.Layout.Add);
>
> }
>
> }
>
>
>
> Any suggestions.
>
>
>
> Thanks.
>
>
>
> Best Regards
>
>
>
> Gerhard
>
>
>
> ___
> 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] Disk Full error while copying DB to emulator

2011-08-11 Thread Mike Child
Check to see how much space is available on your device. If your app & data
is being deployed to your internal memory and not an SD card you may
actually be out of space.


Mike Child


On Thu, Aug 11, 2011 at 11:08 AM, vsr28
wrote:

> Hi Guys
>
> I have created one sample application to fetch SQLite database records. It
> is working properly when database size is small. I kept SQLite database in
> Asset folder of Monodroid application and copying it to device and then
> tries to connect with it.
>
> This works fine with small database size but when i tries to do the same
> with 38MB size of SQLite database then it gives me error of Disk Full after
> running my application and hence application Unable to connect with
> database.
>
> Please help. Thanks in advance
>
> --
> View this message in context:
> http://mono-for-android.1047100.n5.nabble.com/Disk-Full-error-while-copying-DB-to-emulator-tp4689817p4689817.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] MD Error on First Time Install JDK 7

2011-09-17 Thread Mike Child
Android sdk r12 does not require java 7. I don't have java 7 on any of my
computers and r1 tr works fine on them all.you need the java 6 jdk
On Sep 17, 2011 2:17 PM, "vbisbest"  wrote:
> Well it appears that you cant install android sdk r12 without JDK 7 (Says
you
> need to have JDK installed). And I dont see a download for r10. Any ideas?
>
> --
> View this message in context:
http://mono-for-android.1047100.n5.nabble.com/MD-Error-on-First-Time-Install-JDK-7-tp4794596p4794838.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] Debugging in VS2010 is unusable!

2011-09-17 Thread Mike Child
That's pretty much the way it is if you are using the emulator. Not really
anything you can do about it. The android emulator is notoriously slow and
google admits it. It has nothing to do with monodroid. Google is emulating
the arm instructions so it is much closer to the the phone architecture
where as the iPhone simulator is compiled as an x86 app.
On Sep 17, 2011 2:17 PM, "vbisbest"  wrote:
> It takes literally 8 minutes to send a single http request and return the
> response. I have the same code in MonoTouch for iPhone and it takes about
2
> seconds. I saw other people with the same issue on the forums here, but no
> resolution (although my debugger stays connected). I am evaluating before
> purchase and if this is the way it is, this will be a non starter. Please
> let me know if you have any suggestions or fixes that I am missing.
>
> Thanks,
> Ray
>
>
> --
> View this message in context:
http://mono-for-android.1047100.n5.nabble.com/Debugging-in-VS2010-is-unusable-tp4796099p4796099.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] Honeycomb Emulator and "Hello World"

2011-09-21 Thread Mike Child
Try this suggestion that Jonathan Pryor said in a previous posting.

Mono for Android provides two runtimes (VS: Project Properties > Application
tab > Supported architectures), armeabi and armeabi-v7a.

The armeabi architecture is for ARMv5, which has no notion of multi-procesor
support.

The armeabi-v7a architectures is for ARMv7a, which does have a notion of
multi-processor support (and hardware FPU support, and...).

By default, only armeabi is included with your app, meaning that the armeabi
runtime will be used everywhere. However, the armeabi runtime appears to
crash (hard!) on multi-processor systems. For example, if I take the project
attached tohttp://bugzilla.xamarin.com/show_bug.cgi?id=245, comment out the
GC.Collect() call on line 39 (as described in Comment 2), and deploy a
Release build to a Xoom, it crashes in the manner you described.

If I rebuild a Release build and include the armeabi-v7a architecture, it
runs normally.

So is there a bug here? Yes: armeabi shouldn't crash on multi-core
architectures. (We should instead modify it so that it'll only run code on a
single core.) This has been filed as
http://bugzilla.xamarin.com/show_bug.cgi?id=281.

Is there a workaround? Yes: include the armeabi-v7a architecture with your
app.



Mike Child


On Wed, Sep 21, 2011 at 2:13 PM, Dan Ransom  wrote:

> I'm running a trial of the MonoDroid VS extension and I can't seem to get
> the “Hello World” app to run on any Honeycomb emulators. The emulator itself
> seems to be fine and the app works with Gingerbread versions without
> incident. Keep getting error "The application X (process X.X) has stopped
> unexpectedly. Please try again." Tried versions Honeycomb versions 3.0
> through 3.2 with the same error. Any suggestions?
>
> ** **
>
> We need to confirm certain functionality for Android 3 before purchasing a
> license, but since the trial can’t deploy to a real machine unless we can
> get Hello World to work in the emulator it’s a no go.
>
> ** **
>
> Is there something I need to do beyond the instructions on the website?***
> *
>
> ___
> 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] ZXing port to mono for Android

2011-09-27 Thread Mike Child
If you already have the app "Barcode Scanner" (made by zxing) then reading
barcodes can be as simple as passing an Intent to their app.

  Intent intent = new Intent("com.google.zxing.client.android.SCAN");
  intent.setPackage("com.google.zxing.client.android");
  StartActivityForResult(intent,0);


Mike Child


On Tue, Sep 27, 2011 at 8:16 AM, Elan Hasson  wrote:

> That is awesome.
>
> Thanks for sharing this!
>
>
> On Tue, Sep 27, 2011 at 7:37 AM, efontana  wrote:
>
>> https://github.com/JohnACarruthers/zxing.MonoDroid
>>
>> --
>> View this message in context:
>> http://mono-for-android.1047100.n5.nabble.com/ZXing-port-to-mono-for-Android-tp4840736p4845023.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
>
>
___
Monodroid mailing list
Monodroid@lists.ximian.com

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


[mono-android] Failed to get device space on disk using MonoDevelop

2011-10-06 Thread Mike Child
I'm having trouble trying to run/debug and application on my device(Epic
4G). I am using MonoDevelop 2.8 and Mono 4 Android 1.9.1 on a MacBook Pro.

When I try the Run & Debug commands this is the error I'm getting when it
tries to Deploy to Device.
Not enough space on install location. Failed to get device space on disk.

This happens with any app I try, even the sample button click app. For
internal device storage I have 271 MB available and an SD card with 13 GB
free.

For further testing, everything works correctly in MonoDevelop when I use my
Galaxy Tab. On That device I have over 1 GB of internal device storage free.
When I'm on my Windows computer and use Visual Studio, the apps run and
debug correctly on both devices.

Has anybody seen this before or have any things to look for. I have looked
in logcat and nothing stands out as being abnormal.

Mike Child
___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] Failed to get device space on disk using MonoDevelop

2011-10-06 Thread Mike Child
Here is the df output

Filesystem   1K-blocks  Used Available Use% Mounted on
tmpfs   173100 0173100   0% /dev
df: /mnt/.lfs: Function not implemented
tmpfs 4096 0  4096   0%
/sqlite_stmt_journals
tmpfs   173100 0173100   0% /mnt/asec
/dev/block/stl9 264552239712 24840  91% /system
/dev/block/stl10510344234288276056  46% /data
/dev/block/stl11171192 8171184   0% /cache
tmpfs   3228 4  88% /sdx
/dev/block/vold/179:1
  15447040   1972544  13474496  13% /mnt/sdcard
/dev/block/vold/179:1
  15447040   1972544  13474496  13% /mnt/secure/asec
/dev/block/dm-0   3124  2036  1088  65%
/mnt/asec/com.adobe.reader-1
/dev/block/dm-1   2088   524  1564  25%
/mnt/asec/com.google.zxing.client.android-1
/dev/block/dm-2   3124  1584  1540  51%
/mnt/asec/com.pauloslf.cloudprint-1
/dev/block/dm-3  11424  9304  2120  81%
/mnt/asec/com.realarcade.CL4-1
/dev/block/dm-4   3124  2040  1084  65%
/mnt/asec/com.code42.crashplan.android-1
/dev/block/dm-5   4164  3032  1132  73%
/mnt/asec/mobi.mgeek.TunnyBrowser-1
/dev/block/dm-6   3124  1308  1816  42%
/mnt/asec/com.devhd.feedly-1
/dev/block/dm-7   4164  2204  1960  53%
/mnt/asec/com.google.android.apps.unveil-1
/dev/block/dm-8  11424 10008  1416  88%
/mnt/asec/com.google.android.apps.plus-1
/dev/block/dm-9   2088   460  1628  22%
/mnt/asec/com.eclipsim.gpsstatus2-1
/dev/block/dm-11  3124  1460  1664  47%
/mnt/asec/com.rcreations.WebCamViewerPaid-1
/dev/block/dm-12  9352  7956  1396  85%
/mnt/asec/com.samsung.swift.app.kiesair-1
/dev/block/dm-13  3124  1884  1240  60%
/mnt/asec/com.lastpass.lpandroid-1
/dev/block/dm-14  3124  1488  1636  48% /mnt/asec/com.mint-1
/dev/block/dm-15  9352  7224  2128  77%
/mnt/asec/com.netflix.mediaclient-1
/dev/block/dm-16  4164  2244  1920  54%
/mnt/asec/com.koushikdutta.rommanager-1
/dev/block/dm-17  2088   272  1816  13%
/mnt/asec/com.speedsoftware.rootexplorer-1
/dev/block/dm-18  4164  2844  1320  68%
/mnt/asec/com.keramidas.TitaniumBackup-1
/dev/block/dm-19  2088   116  1972   6%
/mnt/asec/com.xmarks.android-1
/dev/block/dm-20 10388  8276  2112  80%
/mnt/asec/com.coupons.GroceryIQ-1


Like i said before, this error only happens in MonoDevelop on my mac.
Everything works as expected on Windows in Visual Studio.

Mike Child


On Thu, Oct 6, 2011 at 5:28 PM, Andreia Gaita  wrote:

> Hi,
>
> Could you run adb shell and then "df" and send the output of that command
> on the Epic 4G, please?
>
> Thanks
>
> andreia
>
> On Thu, Oct 6, 2011 at 9:40 PM, Mike Child  wrote:
>
>> I'm having trouble trying to run/debug and application on my device(Epic
>> 4G). I am using MonoDevelop 2.8 and Mono 4 Android 1.9.1 on a MacBook Pro.
>>
>> When I try the Run & Debug commands this is the error I'm getting when it
>> tries to Deploy to Device.
>> Not enough space on install location. Failed to get device space on disk.
>>
>> This happens with any app I try, even the sample button click app. For
>> internal device storage I have 271 MB available and an SD card with 13 GB
>> free.
>>
>> For further testing, everything works correctly in MonoDevelop when I use
>> my Galaxy Tab. On That device I have over 1 GB of internal device storage
>> free. When I'm on my Windows computer and use Visual Studio, the apps run
>> and debug correctly on both devices.
>>
>> Has anybody seen this before or have any things to look for. I have looked
>> in logcat and nothing stands out as being abnormal.
>>
>> Mike Child
>>
>> ___
>> 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


Re: [mono-android] VS not recognizing Samsung GALAXY Tab

2011-10-13 Thread Mike Child
My Tab also works fine in Windows 7. I did not have download any drivers to
get it to work. As someone else said, make you have the Tabs usb debugging
turned on. If you can see it in mass storage mode, then usb debugging is
probably not on, our not working.
One thing I have noticed on my Tab though is that the usb debugging keeps
turning off on its own after a certain amount of time.
On Oct 13, 2011 10:39 AM, "Steve Sharrock"  wrote:
___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] debugging in Visual Studio w/ 1.9.1

2011-10-13 Thread Mike Child
I have also noticed the issue when starting the debug, the app deploys, but
never starts. Usually I deploy the app first then I hit debug. I have not
had the problem since when doing it like that. It seemed to happen the most
when I make code changes and hit debug. I don't remember it ever happening
yet if I hit debug, but have not made any code changes.
On Oct 13, 2011 10:50 AM, "Nicklas Møller Jepsen" 
wrote:

>  I can confirm this behavior.
>
> ** **
>
> I’ve tested this on several devices (HTC Desire S, HTC Sensation, HTC
> Wildfire, Samsung Galaxy II, etc.) and sometimes the debugger fails to
> attach. Other times the app is just deployed and not actually started.
>
> Reconnecting the device seems to be a way to work around this issue.
>
> ** **
>
> It’s not my opinion that the outdated PDB file has anything to do with this
> issue as a Clean make no difference.
>
> ** **
>
> Regards, Nicklas
>
> ** **
>
> *From:* monodroid-boun...@lists.ximian.com [mailto:
> monodroid-boun...@lists.ximian.com] *On Behalf Of *Wally McClure
> *Sent:* 13. oktober 2011 16:46
> *To:* monodroid@lists.ximian.com
> *Subject:* Re: [mono-android] debugging in Visual Studio w/ 1.9.1
>
> ** **
>
> Thanks Elan.  I did a clean and started debugging again.  I received the
> same problems.
>
> Wally
>  --
>
> From: e...@elanhasson.com
> Date: Thu, 13 Oct 2011 10:31:26 -0400
> To: monodroid@lists.ximian.com
> Subject: Re: [mono-android] debugging in Visual Studio w/ 1.9.1
>
> Wally,
>
> ** **
>
> I have seen this behavior with all project types in VS2010 in general. My
> understanding is that this occurs when the source code does not match the
> binary being debugged (PDBs out of date).
>
> ** **
>
> I resolve this by doing a build clean.
>
> ** **
>
> Hope this helps,
>
> ** **
>
> Elan
>
> On Thu, Oct 13, 2011 at 10:15 AM, Wally McClure <
> theevilprogram...@hotmail.com> wrote:
>
> A couple of issues that I am seeing:
>
>- I'm able to set breakpoints in VS.  When i debug on my evo device,
>the breakpoints are hit, however, the lines that are stopped on don't 
> always
>correspond to the specific line of a breakpoint.
>- I'm finding that the app that I want to debug seems to sometimes
>startup on the device and sometimes not.
>
> I'm guessing that these are bugs.
>
> I'm using Visual Studio 2010, Win7 x64, M4A 1.9.1.
>
> Wally
>
>
> ___
> 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
>
>
___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] How to Update Monodroid Visual Studio Plugin

2011-10-17 Thread Mike Child
Just download the latest release and install.
On Oct 17, 2011 2:07 AM, "Nirban Dutta" 
wrote:

> Hi,
>
> ** **
>
> We have Enterprise Monodroid.
>
> ** **
>
> Please let me know how to update the Visual Studio Plugin to the latest
> release of Monodroid without re-installing it fully(which may reset the
> Licence).
>
> ** **
>
> Regards,
>
> ** **
>
>  
>
> *Nirban Dutta*
>
>  
>
> Software Engineer
>
> [image: PROJECTCENTRE_LOGO_] 
>
>  
>
> *P* 1300 653 420 |* M* +61 432 675 543 
>
> [image: Deloitte_TF50Winner]
>
> *F* +61 (0) 2 9420 8277
>
> 3 / 11 Orion Road, Lane Cove, NSW, Australia 2066
>
> CADX PTY LTD DISCLAIMER: The information contained in this email message is
> CONFIDENTIAL INFORMATION, and may also be LEGALLY PRIVILEGED, intended only
> for the individual or entity named above. If you are not the intended
> recipient, you are hereby notified that any use, review, dissemination,
> distribution or copying of this document is strictly prohibited. If you have
> received this document in error, please immediately notify us by email and
> destroy the original message. CADX disclaims all liability and
> responsibility for any direct or indirect loss or damage that may be
> suffered by any recipient of this message
>
> ** **
>
> ___
> 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] Custom IListAdapter works on 1.9.0, fails on 1.9.1

2011-10-17 Thread Mike Child
If this is similar to a situation I had then you also need to inherit from
Java.Lang.Object. This will implement the Handle property for you. In
researching my issue I was told that you should never implement the Handle
property yourself. So I believe it should go something like this...

class YourListAdapter : Java.Lang.Object, IListAdapter

Hope that helps
Mike Child


On Mon, Oct 17, 2011 at 1:42 PM, HSSoftware wrote:

> In my custom IListAdapter implementation, I had not implemented the Handle
> property, as I was unsure what to do. So I just throw a
> NotImplementedException. It worked without a problem on 1.9.0. But it is
> now
> throwing my NotImplementedException on 1.9.1, so evidently someone is
> trying
> to use the Handle property.
>
> How SHOULD an IListAdapter respond to the get accessor for the Handle
> property?
>
> --
> View this message in context:
> http://mono-for-android.1047100.n5.nabble.com/Custom-IListAdapter-works-on-1-9-0-fails-on-1-9-1-tp4910764p4910764.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] Webservice Deserialization Error

2011-10-20 Thread Mike Child
This may or may not be any help for you, but could be something to look
into/test. In your webservice are you passing any DateTime objects back to
they client?

My setup is a bit different. I'm using WCF that is returning json. I'm just
using httpwebrequest to hit my services and then I deserialize the object in
MonoDroid. It was always crashing on me until I removed the DateTime object.
Haven't found a way around it yet as it wasn't an important field so I
haven't looked into it.

So like I said, my setup is different but it may be something to test.
Mike Child


On Thu, Oct 20, 2011 at 10:28 AM,  wrote:

>
> Hi,
>
> i have tested including the calculator Webservice from the official
> tutorial. Worked fine. Then i included my srervice again and the error was
> back. I managed to provide my service on a public server. If any of you have
> an idea what could be the reason, please try:
> http://91.190.202.121:8083/Sync.svc?wsdl
>
> If i generat Clientcode via slsvcutil it seems to work until i pass a
> Complex Datatype as out-parameter back to the client. Wireshark sows that
> the soapmessage contains the data, but in the completed-event the variable
> is null. Any ideas how to solve this? I urgently need either a .Net 2.0
> Webservice solution or a WCF solution. But both don't work...
>
> Thanks in advance
>
> Bernhard
>
>
>
>
>
>  *bernhardgess...@cs-ag.de*
> Gesendet von: monodroid-boun...@lists.ximian.com
>
> 05.10.2011 20:43
>   Bitte antworten an
> Discussions related to Mono for Android 
>
>   An
> Discussions related to Mono for Android 
>  Kopie
>   Thema
> [mono-android] Antwort: Re:  Webservice Deserialization Error
>
>
>
>
>
> Hi,
>
> i already tried release and debug, each with and without linking. As the
> services work from my other clients on iOS (monotouch), wp7, winCe and
> windows i dont think its a problem with the services. And
> According to WireShark there is no single packet transfered...
>
> Bernhard
>
>
>
>   *Glen Hassell *
> Gesendet von: monodroid-boun...@lists.ximian.com
>
> 05.10.2011 12:10
>   Bitte antworten an
> Discussions related to Mono for Android 
>
>   An
> Discussions related to Mono for Android 
> Kopie
>   Thema
> Re: [mono-android] Webservice Deserialization Error
>
>
>
>
>
>
> Suggestion:
> *
> **http://www.soapui.org/* <http://www.soapui.org/> - very useful for
> inspecting web services during the SDLC.
>
> Wireshark is very useful filtering on any value of a HTTP request /
> response to capture all the requests to a particular host, like your mobile
> device, of course attached within your local network.
>
> Have a lot of Phun...
>
> :-)
>
> On Wed, Oct 5, 2011 at 6:58 AM, Jonathan Pryor 
> <*j...@xamarin.com*>
> wrote:
> Is this a Release build, and/or do you have linking enabled?
>
> Thanks,
> - Jon
>
> On Oct 4, 2011, at 3:00 PM, 
> *bernhardgess...@cs-ag.de*wrote:
>
> >
> > Hi,
> >
> >
> > i got a monodroid appication and a few librarys. One of the librarys
> contains 2 Webservice References. If i call them from my app, no matter wich
> method (e.g. no parameters, no return value) i get the following error:
> >
> > {System.IndexOutOfRangeException: Array index is out of range.
> >   at (wrapper stelemref) object:virt_stelemref_object (intptr,object)
> >   at System.Xml.Serialization.XmlTypeMapMember.SetValueSpecified
> (System.Object ob, Boolean value) [0xc] in
> /home/jon/Development/xamarin/mono/mcs/class/System.XML/System.Xml.Serialization/XmlTypeMapMember.cs:200
> >   at
> System.Xml.Serialization.XmlSerializationReaderInterpreter.SetMemberValue
> (System.Xml.Serialization.XmlTypeMapMember member, System.Object ob,
> System.Object value, Boolean isValueList) [0x0002d] in
> /home/jon/Development/xamarin/mono/mcs/class/System.XML/System.Xml.Serialization/XmlSerializationReaderInterpreter.cs:585
> >   at
> System.Xml.Serialization.XmlSerializationReaderInterpreter.SetMemberValueFromAttr
> (System.Xml.Serialization.XmlTypeMapMember member, System.Object ob,
> System.Object value, Boolean isValueList) [0x00028] in
> /home/jon/Development/xamarin/mono/mcs/class/System.XML/System.Xml.Serialization/XmlSerializationReaderInterpreter.cs:596
> >   at
> System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadMessage
> (System.Xml.Serialization.XmlMembersMapping typeMap) [0x00057] in
> /home/jon/Development/xamarin/mono/mcs/class/System.XML/System.Xml.Serialization/XmlSerializationReaderInterpreter.cs:125
> >   at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadRoot
> () [0x0004c] in
> /ho

Re: [mono-android] REST Example

2011-11-01 Thread Mike Child
You would use DataContractJsonSerializer. It is under the
System.Runtime.Serialization.Json namespace.


Mike Child


On Tue, Nov 1, 2011 at 3:24 AM, moelski  wrote:

> Hi again,
>
> I got it working in a .net4 Windows app with this code:
>
>
> But JavaScriptSerializer is not available for MonoAndroid
>
> --
> View this message in context:
> http://mono-for-android.1047100.n5.nabble.com/Re-REST-Example-tp4952559p4954493.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] Passing information between tabs

2011-11-09 Thread Mike Child
Multiple inheritance is not possible. But looking at the msdn example, it's
implementiing INotifyPropertyChanged, which is an interface. You can
implement multiple interfaces.

Mike Child


On Wed, Nov 9, 2011 at 2:53 PM, Paul F. Johnson  wrote:

> Hi,
>
> > Thought about having a third class outside handling all that
> > information and notifying the classes within when the collection of
> > data changes?
> >
> > See an example of this here:
> > http://msdn.microsoft.com/en-us/library/ms743695.aspx
> >
> > Then make a static reference to that class somewhere and pass it
> > around to your activities and have them listen to the PropertyChanged.
> > Then make sure on each change to notify and grab that notification in
> > the respective activities.
>
> That's pretty cool. However, is multiple inheritance supported in C#?
> ISTR it isn't.
>
> Paul
>
> --
> Vertraue mir, ich weiss, was ich mache...
>
> ___
> 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] HttpURLConnection to local web server from phone

2011-11-09 Thread Mike Child
Are you sure the phone and computer our on the same network and subnet. If
they are then check the firewall on you're computer. There should be no
problems connecting by using your computers IP address if all those things
checkout.
On Nov 9, 2011 8:26 PM, "Lomicka"  wrote:

> Still stuck.  Anyone have any suggestions?
>
> --
> View this message in context:
> http://mono-for-android.1047100.n5.nabble.com/HttpURLConnection-to-local-web-server-from-phone-tp4968864p4979702.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] Reinstall and Active

2011-11-10 Thread Mike Child
3 activations are possible. However, you can just log into your account at
store.xamarin.com and you can reset/recycle activation's that are no longer
being used.

Mike Child


On Thu, Nov 10, 2011 at 8:38 PM, cb  wrote:

> Hi I have bought the Mono for Android and activated it on my computer
> successfully, but several days later, my OS crashed and can NOT be used
> again. so I formated the hard disk and reinstalled Windows 7 agian. Now I
> install the Mono for Android again. My question is can I activate MonoDroid
> again, how many times can I activate it for my same machine? Thanks Frank
> --
> View this message in context: Reinstall and 
> Active<http://mono-for-android.1047100.n5.nabble.com/Reinstall-and-Active-tp4982985p4982985.html>
> Sent from the Mono for Android mailing list 
> archive<http://mono-for-android.1047100.n5.nabble.com/>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] HTTPs problems

2011-11-16 Thread Mike Child
What version of MonoDroid are you using? That same snippet of code works
just fine on my phone. I'm using the beta version 1.9.2

Mike Child


On Tue, Nov 15, 2011 at 11:12 PM, Stuart Lodge  wrote:

> Hi
>
> I'm finding that I get an exception when I try to download content from
> any HTTPs address.
>
> Basic code I'm trying is:
>
> var wc = new WebClient ();
> var test1 = wc.DownloadString("http://www.google.com";);
> var test2 = wc.DownloadString("https://www.google.com";)
>
> http succeeds, https fails with: {System.Net.WebException: Error getting
> response stream (Write: EndWrite failure): SendFailure --->
> System.IO.IOException: EndWrite failure --->
> System.Net.Sockets.SocketException: The socket has been shut down at
> System.Net.Sockets.Socket.EndSend (IAsyncResult result) [0x0002d] in
> /home/jon/Development/xamarin/mono/mcs/class/System/System.Net.Sockets/Socket_2_1.cs:1989
>
> Details are also on
> http://stackoverflow.com/questions/8124854/i-cant-download-from-https-on-monodroid-am-i-missing-something-obvious
>
> Is there anything I can do to get this working (e.g. some compilation or
> manifest setting)?
>
> Thanks
>
> Stuart
>
> ___
> 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] HTTPs problems

2011-11-16 Thread Mike Child
The first time I tried this it was on an actual device, but I just tried
again on the emulator just to make sure it wasn't something goofy with that
and it still worked.

 var wc = new WebClient ();
 var test2 = wc.DownloadString("https://www.google.com";)

So it could be a bug in the version 1.2.2 of MonoDroid(which is the current
release version). Being on the 1.9.2 beta version it does work. As far as
getting the beta version, I don't know that you can without having a
license. Hopefully someone with more knowledge on that could answer for you.


Mike Child


On Wed, Nov 16, 2011 at 4:04 PM, Stuart Lodge  wrote:

> Thanks for confirming that its working for you.
>
> Not entirely sure what version I'm on - I downloaded it as an eval last
> week.
>
> The version info I can see in MonoDevelop is: MonoDevelop.MonoDroid -
> 2.6.0.0 - and - runtime "Mono for Android: 1.2.24817.105690530 (Evaluation)"
>
> So maybe I'm just on something really old... will look at whether there's
> anything I can do about it:)
>
> Any hints about where to look appreciated (I've ticked the beta box in
> MonoDevelop but isn't reporting any updates)
>
> Thanks again
>
> Stuart
>
>
>
> On 16 November 2011 13:07, Mike Child  wrote:
> > What version of MonoDroid are you using? That same snippet of code works
> > just fine on my phone. I'm using the beta version 1.9.2
> > Mike Child
> >
> >
> > On Tue, Nov 15, 2011 at 11:12 PM, Stuart Lodge  wrote:
> >>
> >> Hi
> >> I'm finding that I get an exception when I try to download content from
> >> any HTTPs address.
> >> Basic code I'm trying is:
> >>
> >> var wc = new WebClient ();
> >> var test1 = wc.DownloadString("http://www.google.com";);
> >> var test2 = wc.DownloadString("https://www.google.com";)
> >>
> >> http succeeds, https fails with: {System.Net.WebException: Error getting
> >> response stream (Write: EndWrite failure): SendFailure --->
> >> System.IO.IOException: EndWrite failure --->
> >> System.Net.Sockets.SocketException: The socket has been shut down at
> >> System.Net.Sockets.Socket.EndSend (IAsyncResult result) [0x0002d] in
> >>
> /home/jon/Development/xamarin/mono/mcs/class/System/System.Net.Sockets/Socket_2_1.cs:1989
> >> Details are also
> >> on
> http://stackoverflow.com/questions/8124854/i-cant-download-from-https-on-monodroid-am-i-missing-something-obvious
> >> Is there anything I can do to get this working (e.g. some compilation or
> >> manifest setting)?
> >> Thanks
> >> Stuart
> >> ___
> >> 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
>
>
___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] Being driven insane....

2011-11-23 Thread Mike Child
I found this code through some searching. I am using json in my code
but using xml should be relatively simple change in the code.

public static byte[] ToJson(T instance)  --> it's converted to
byte[] because i'm using it in httpwebrequest, you could just return
the string.
{
  DataContractJsonSerializer ser = new
DataContractJsonSerializer(typeof(T));
  MemoryStream ms = new MemoryStream();
  ser.WriteObject (ms,instance);
  String json = Encoding.UTF8.GetString (ms.ToArray ());
  return UTF8Encoding.UTF8.GetBytes (json);
}

public static T FromJson(string json)
{

  DataContractJsonSerializer ser = new
DataContractJsonSerializer(typeof(T));
  using(var tempStream = new MemoryStream(Encoding.UTF8.GetBytes (json)))
return (T)ser.ReadObject(tempStream);

}

Mike Child


On Wed, Nov 23, 2011 at 11:16 AM, nodoid  wrote:
>
> Hi,
>
> Re XML serialization...
>
> Typically, I would use (say)
>
> foo p = new p();
>
> System.Xml.Serialization.XmlSerializer x = new
> System.Xml.Serialization.XmlSerializer(p.GetType());
> x.Serialize(Console.Out, p);
>
> Obviously, I can't use Console.Out, so where do I need to point it to (for
> example a temporary file or something like that)?
>
> Thanks
>
> Paul
>
> --
> View this message in context: 
> http://mono-for-android.1047100.n5.nabble.com/Being-driven-insane-tp5016975p5017190.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] App Crashes on Samssung Galaxy SGH-1897 - Uncatchable Exception thrown by mono

2011-12-09 Thread Mike Child
I'm not sure if this is the issue or not but from the device specs I
take it that they device is running Android 2.1. There is a known
issues with 2.1 where Samsung release a broken kernel. The following
text is taking from the Xamarin web site

"Warnings
Warning: Samsung shipped a broken kernel with Android 2.1, which is
not able to support JIT compilation. If you possess a Galaxy-class
device with Android 2.1, you will get unexpected results, this is
caused by a kernel bug that breaks cache coherency, rendering any
engine doing JIT compilation useless. Check with your
manufacturer/carrier for an Android 2.2 update."


Since I see some calls to Reflection.Emit, this may be this issue.
Hopefully someone better at reading the log and more knowledgeable
than me can help answer.

Mike Child



On Fri, Dec 9, 2011 at 12:02 PM, klimaye  wrote:
> The app is on the store and crashes as soon as it is started. This does not
> happen on a host of other devices.
>
> We tested on Samsung Galaxy S2 and this did not happen. This happens on the
> Samsung Galaxy S1 phone.
>
> Device Spec :
> Phone :  Samsung Galaxy SGH - 1897
> Kernel : 2.6.9
> Firmware : 2.1
>
> Please advice, we would like our customers to get an update ASAP if
> possible.
>
> If there is a newer build I can try, please let me know.
>
> Thanks
>
>
> Log :
>
> I/monodroid-gc(31885): environment does not support jni NewWeakGlobalRef
> E/mono    (31885):
> E/mono    (31885): Unhandled Exception: System.NullReferenceException:
> Object reference not set to an instance of an object
> E/mono    (31885):   at System.Reflection.Emit.DynamicMethod..ctor
> (System.String name, MethodAttributes attributes, CallingConventions
> callingConvention, System.Type returnType, System.Type[] parameterTypes,
> System.Type owner, Boolean skipVisibility) [0x0] in :0
> E/mono    (31885):   at System.Reflection.Emit.DynamicMethod..ctor
> (System.String name, System.Type returnType, System.Type[] parameterTypes,
> System.Type owner, Boolean skipVisibility) [0x0] in :0
> I/ActivityManager( 2244): Starting activity: Intent {
> act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER]
> flg=0x1020 cmp=Test.PocketRx/pocketrxmono.AppStartActivity }
> I/ActivityManager( 2244): Start proc Test.PocketRx for activity
> Test.PocketRx/pocketrxmono.AppStartActivity: pid=31990 uid=10134 gids={3003,
> 1006}
> I/ActivityThread(31990): Publishing provider Test.PocketRx.__mono_init__:
> mono.MonoRuntimeProvider
> D/dalvikvm(31990): Trying to load lib
> /data/data/TEST.PocketRx/lib/libmonodroid.so 0x47a6da30
> D/dalvikvm(31990): Added shared lib
> /data/data/TEST.PocketRx/lib/libmonodroid.so 0x47a6da30
> I/monodroid-gc(31990): environment does not support jni NewWeakGlobalRef
> W/        (31990): invalid code stream, instruction before IMT value is not
> a LDC in mono_arch_find_imt_method() (code 0x4ba05fd4 value 0: 0xe58d0008
> -1: 0xe591f064 -2: 0xe1a0e00f)
> F/        (31990): * Assertion at ../../../../mono/mini/mini-arm.c:5559,
> condition `IS_LDR_PC (code_ptr [0])' not met
> I/mono    (31990): Stacktrace:
> I/mono    (31990):
> I/mono    (31990):   at
> System.Collections.CaseInsensitiveHashCodeProvider.AreEqual
> (System.Globalization.CultureInfo,System.Globalization.CultureInfo)
> <0x00023>
> I/mono    (31990):   at
> System.Collections.CaseInsensitiveHashCodeProvider..cctor () <0x00027>
> I/mono    (31990):   at (wrapper runtime-invoke) object.runtime_invoke_void
> (object,intptr,intptr,intptr) <0x>
> I/mono    (31990):   at System.Security.Cryptography.CryptoConfig.Initialize
> () <0x0001b>
> I/mono    (31990):   at
> System.Security.Cryptography.CryptoConfig.CreateFromName (string,object[])
> <0x0006f>
> I/mono    (31990):   at
> System.Security.Cryptography.CryptoConfig.CreateFromName (string) <0x00017>
> I/mono    (31990):   at
> System.Security.Cryptography.RandomNumberGenerator.Create (string) <0x00013>
> I/mono    (31990):   at
> System.Security.Cryptography.RandomNumberGenerator.Create () <0xf>
> I/mono    (31990):   at System.Guid.NewGuid () <0x0008f>
> I/mono    (31990):   at Android.Runtime.JNINativeWrapper.CreateDelegate
> (System.Delegate,System.Reflection.MethodInfo,System.Reflection.MethodInfo)
> <0x00187>
> I/mono    (31990):   at Android.Runtime.JNINativeWrapper.CreateDelegate
> (System.Delegate) <0x0001b>
> I/mono    (31990):   at Android.App.Application.GetOnCreateHandler ()
> <0x00067>
> I/mono    (31990):   at Android.Runtime.JNIEnv.RegisterJniNatives
> (intptr,int,intptr,intptr,int) <0x0055b>
> I/mono    (31990):   at (wrapper runtime-invoke)
> .runtime_invoke_void_intptr_int_in

Re: [mono-android] MonoDroid 4.0.1, APP Crash when debugging

2011-12-19 Thread Mike Child
Do you have the HTC sync software installed on your computer? If you
do that could be the issue.

Mike Child



On Mon, Dec 19, 2011 at 7:46 AM, Renato Degelo  wrote:
> More information:
>
> I was trying debug in an HTC Glacier...
>
> Now, i tried debug in an Optimus 2x and everything worked...
>
> Semms that its a problem with an specific device.
>
> Any sugestions?
>
> --
> View this message in context: 
> http://mono-for-android.1047100.n5.nabble.com/MonoDroid-4-0-1-APP-Crash-when-debugging-tp5081067p5086027.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] Using DatePickerDialog

2011-12-20 Thread Mike Child
yes, the month value is 0 based, so 12 is not valid. You would want to use 11.

Mike Child



On Tue, Dec 20, 2011 at 3:09 AM, Tomasz Cielecki  wrote:
> I just made a small sample here:
> https://github.com/Cheesebaron/MonoDroid.DatePickerSample
>
> But what your exception is saying that some of the values you have fed
> the DatePickerDialog are invalid:
> java.lang.IllegalArgumentException: current should be >= start and <= end
>
> I think it is the 12 you have put in for the month. Maybe it expects
> 11 as the months might be 0 indexed. Just like the sample shows
> date.Month - 1.
>
> On Tue, Dec 20, 2011 at 5:39 AM, Tom Opgenorth  wrote:
>> Tutorial is fixed, but I'm getting an error when I try to use the
>> DatePickerDialog.  Basically, I have a button that when when clicked will
>> display the DatePickerDialog.  You pick your date, and then the date is
>> displayed as the text of the button. The exception occurs when you click on
>> the button, and the DatePickerDialog is about to be displayed.  Any
>> thoughts?
>>
>> Here is my OnCreateDialog:
>>
>>         protected override Dialog OnCreateDialog(int id)
>>
>>         {
>>
>>             try
>>
>>             {
>>
>>                 switch (id)
>>
>>                 {
>>
>>                     case DateDialogId:
>>
>>                         return new DatePickerDialog(this, OnDateSet, 2011,
>> 12, 01);
>>
>>                 }
>>
>>                 return null;
>>
>>             }
>>
>>             catch (Exception e)
>>
>>             {
>>
>>                 Console.WriteLine(e);
>>
>>                 return null;
>>
>>             }
>>
>>         }
>>
>> Ignore the try/catch, I was simply using it to help with sorting out the
>> exception. Drilling down through all the exceptions, this is the meat of the
>> exception:
>>
>> at Android.Runtime.JNIEnv.NewObject (IntPtr jclass, IntPtr jmethod,
>> Android.Runtime.JValue[] parms) [0x00030] in
>> /home/jpobst/Desktop/monodroid/Mono.Android/src/Runtime/JNIEnv.cs:406 \n  at
>> Android.App.DatePickerDialog..ctor (Android.Content.Context context,
>> IOnDateSetListener callBack, Int32 year, Int32 monthOfYear, Int32
>> dayOfMonth) [0x000e8] in
>> /home/jpobst/Desktop/monodroid/Mono.Android/platforms/android-8/src/generated/Android.App.DatePickerDialog.cs:174
>> \n  at Android.App.DatePickerDialog..ctor (Android.Content.Context context,
>> System.EventHandler`1 callBack, Int32 year, Int32 monthOfYear, Int32
>> dayOfMonth) [0x0] in :0 \n  at
>> net.opgenorth.m4a.mytrips.AddTripActivity.OnCreateDialog (Int32 id)
>> [0xe] in
>> U:\\work\\android\\mytrips.root\\dotnet\\net.opgenorth.m4a.mytrips\\net.opgenorth.m4a.mytrips\\AddTripActivity.cs:62
>> \n  --- End of managed exception stack trace
>> ---\njava.lang.IllegalArgumentException: current should be >= start and <=
>> end\n\tat
>> android.widget.NumberPicker.setCurrent(NumberPicker.java:288)\n\tat
>> android.widget.DatePicker.updateSpinners(DatePicker.java:362)\n\tat
>> android.widget.DatePicker.init(DatePicker.java:352)\n\tat
>> android.app.DatePickerDialog.(DatePickerDialog.java:127)\n\tat
>> android.app.DatePickerDialog.(DatePickerDialog.java:86)\n\tat
>> net.opgenorth.m4a.mytrips.AddTripActivity.n_onCreateDialog(Native
>> Method)\n\tat
>> net.opgenorth.m4a.mytrips.AddTripActivity.onCreateDialog(AddTripActivity.java:34)\n\tat
>> android.app.Activity.onCreateDialog(Activity.java:2482)\n\tat
>> android.app.Activity.createDialog(Activity.java:882)\n\tat
>> android.app.Activity.showDialog(Activity.java:2557)\n\tat
>> android.app.Activity.showDialog(Activity.java:2524)\n\tat
>> mono.android.view.View.OnClickListenerImplementor.n_onClick(Native
>> Method)\n\tat
>> mono.android.view.View.OnClickListenerImplementor.onClick(OnClickListenerImplementor.java:27)\n\tat
>> android.view.View.performClick(View.java:2485)\n\tat
>> android.view.View$PerformClick.run(View.java:9080)\n\tat
>> android.os.Handler.handleCallback(Handler.java:587)\n\tat
>> android.os.Handler.dispatchMessage(Handler.java:92)\n\tat
>> android.os.Looper.loop(Looper.java:123)\n\tat
>> android.app.ActivityThread.main(ActivityThread.java:3683)\n\tat
>> java.lang.reflect.Method.invokeNative(Native Method)\n\tat
>> java.lang.reflect.Method.invoke(Method.java:507)\n\tat
>> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)\n\tat
>> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)\n\t

Re: [mono-android] Gesture listener subclass no longer works with V4

2011-12-30 Thread Mike Child
Like Tomasz said, Inherit from Java.Lang.Object. You should never
implement the Handle property yourself.

Mike Child



On Fri, Dec 30, 2011 at 7:16 AM, Tomasz Cielecki  wrote:
> Have your class GestureListener inherit Java.Lang.Object, this way you
> don't have to Implement the Handle property. I did this with an
> ISensorEventListener and it works just fine.
>
> On Fri, Dec 30, 2011 at 12:18 PM, John Murray  wrote:
>> The following code adapted from some stuff on Stackoverflow has served me
>> well up to now
>>
>> I have made major adaptations to it  but this code is the basic original –
>> I’ve stripped everything out and put it in the simple one button one
>> textview MonoDroid sample project but it behaves the same under v4 as my
>> main project viz if falls over with an unhandled exception on lines
>>
>>
>>
>>     public IntPtr Handle
>>
>>     {
>>
>>     get { throw new NotImplementedException(); }
>>
>>     }
>>
>> In the OnCreate when the line
>>
>> gestureScanner = new GestureDetector(this, gestureListener);
>>
>> then as this instance of gesture detector is called it goes straight to the
>> IntPtr  code and hangs
>>
>>
>>
>> Presumably v4 is now enforcing some correct way of doing things and this
>> code is not acceptable – I cannot trace what’s going on – as soon as the
>> onCreate is called it seems to go straight to this line and fall over – as I
>> said never happened until v4
>>
>> I know it is probably my code but I couldn’t get it much simpler – I have
>> probably mistranslated from the Java code I found on StackOverFlow and as I
>> am boilerplating I don’t really understand deeply what’s going on with the
>> Java Handle
>>
>> Any help gratefully received
>>
>> John Murray
>>
>>
>>
>> ///
>>
>> using System;
>>
>>
>>
>> using Android.App;
>>
>> using Android.Content;
>>
>> using Android.Runtime;
>>
>> using Android.Views;
>>
>> using Android.Widget;
>>
>> using Android.OS;
>>
>> using Android.Gestures;
>>
>>
>>
>> namespace MonodroidC
>>
>> {
>>
>>     [Activity(Label = "MonodroidC", MainLauncher = true, Icon =
>> "@drawable/icon")]
>>
>>     public class Activity1 : Activity
>>
>>     {
>>
>>     private TextView displayText;
>>
>>     private GestureDetector gestureScanner;
>>
>>     private GestureListener gestureListener;
>>
>>
>>
>>     protected override void OnCreate(Bundle bundle)
>>
>>     {
>>
>>     base.OnCreate(bundle);
>>
>>     SetContentView(Resource.Layout.Main);
>>
>>     displayText = FindViewById(Resource.Id.t11);
>>
>>     gestureListener = new GestureListener(displayText);
>>
>>     gestureScanner = new GestureDetector(this, gestureListener);
>>
>>     }
>>
>>
>>
>>     public override bool OnTouchEvent(MotionEvent e)
>>
>>     {
>>
>>     return gestureScanner.OnTouchEvent(e);
>>
>>     }
>>
>>     }
>>
>>
>>
>>     public class GestureListener : GestureDetector.IOnGestureListener
>>
>>     {
>>
>>     private readonly TextView view;
>>
>>     private static int SWIPE_MAX_OFF_PATH = 250;
>>
>>     private static int SWIPE_MIN_DISTANCE = 120;
>>
>>     private static int SWIPE_THRESHOLD_VELOCITY = 200;
>>
>>     public GestureListener(TextView view)
>>
>>     {
>>
>>     this.view = view;
>>
>>     }
>>
>>
>>
>>     public IntPtr Handle
>>
>>     {
>>
>>     get { throw new NotImplementedException(); }
>>
>>     }
>>
>>
>>
>>     public bool OnDown(MotionEvent e)
>>
>>     {
>>
>>     view.Text = "- DOWN -";
>>
>>     return true;
>>
>>     }
>>
>>
>>
>>     public bool OnFling(MotionEvent e1, MotionEvent e2, float velocityX,
>> float velocityY)
>>
>>     {
>>
>>     try
>>
>>     {
>>
>>     if (Math.Abs(e1.GetY() - e2.GetY()) > SWIPE_MAX_