Re: [mono-android] Copying data between Dalvik and Mono... major slowdown.

2013-01-09 Thread Willem Meints
Good to hear you got it fixed :)
Tooling is one thing, but it pays to sometimes apply some old school 
handcoding. 

-Oorspronkelijk bericht-
Van: monodroid-boun...@lists.ximian.com 
[mailto:monodroid-boun...@lists.ximian.com] Namens Jeremy A. Kolb - ARA/NED
Verzonden: maandag 7 januari 2013 14:51
Aan: Discussions related to Mono for Android
Onderwerp: Re: [mono-android] Copying data between Dalvik and Mono... major 
slowdown.

I had a feeling that was why.  Anyway I wrote my own implementation in C# using 
Mono.Data.Sqlite with my own version of the ContentValues class.  It now 
executes in 1/4 of the time.

-Original Message-
From: monodroid-boun...@lists.ximian.com 
[mailto:monodroid-boun...@lists.ximian.com] On Behalf Of Jonathan Pryor
Sent: Sunday, January 06, 2013 10:34 PM
To: Discussions related to Mono for Android
Subject: Re: [mono-android] Copying data between Dalvik and Mono... major 
slowdown.

On Jan 3, 2013, at 4:32 PM, Jeremy A. Kolb - ARA/NED  wrote:
> Furthermore, In:
>  
> [Register("bulkInsert", 
> "(Landroid/net/Uri;[Landroid/content/ContentValues;)I", "")]
> public int BulkInsert(Android.Net.Uri url, ContentValues[] values)
> {
>   IntPtr num1 = JNIEnv.NewArray(values);
>   ...
>   if (values != null)
>   {
> JNIEnv.CopyArray(num1, values);
> JNIEnv.DeleteLocalRef(num1);
>   }
>   return num2;
> }
>  
> Why is the array copied back in after the function call? values shouldn't 
> have changed.

_You_ know that. The generator does not; it can change on a method-by-method 
basis, and the generator needs to generate code to support it.

>  url certainly doesn't get the same treatment.

`url` isn't an array, and thus has "pass by value" semantics.

For example, consider this potential Java method:

public int bulkInsert(Uri url, ContentValues[] values) {
url = new Url (...);
values [0] = new ContentValues (...);
}

The caller of `bulkInsert()` will _not_ be able to see that bulkInsert() 
modified `url`. That is _not_ true for `values[0]`; the caller _will_ be able 
to see the change performed to `values[0]`, were it to be changed.

 - 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

Op dit e-mailbericht is de disclaimer van Info Support van toepassing, zie 
http://www.infosupport.com/disclaimer
___
Monodroid mailing list
Monodroid@lists.ximian.com

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


[mono-android] submitting data from webview

2013-01-09 Thread javitxin
Hi, 

I am trying to submit data to a url from a webview...with no success...

this is my code.. am I doing something wrong? 

 Android.Webkit.WebView webview = new Android.Webkit.WebView(this);

webview.Settings.LoadWithOverviewMode = true;
webview.Settings.UseWideViewPort = true;
webview.Settings.JavaScriptEnabled = true;
webview.SetPadding(0, 0, 0, 0);
webview.SetInitialScale(1);

SetContentView(webview);

string _post = "value1=val1&value2=val2";
byte[] post = Encoding.UTF8.GetBytes(_post);
webview.PostUrl("http://xxx.com";, post);

The fact.. this code seems to work but the parameters are not working. the
submitted parameters are used to log into the web...but..


thanks in advance!!



--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/submitting-data-from-webview-tp5712730.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