Re: [mono-android] Simple LAUNCHER (KIOSK)

2012-04-10 Thread Goncalo Oliveira
By returning to the tablet operating system I assume you want to invoke
another launcher...

you'll have to either invoke one that you know or ask what are the
launchers available when there is more than one.

You can query what are the launchers available by doing this:

IList resolveList = PackageManager.QueryIntentActivities( new
Intent( Intent.ActionMain ).AddCategory( Intent.CategoryHome ),
(int)PackageInfoFlags.MatchDefaultOnly );

To invoke one of the launchers...

ResolveInfo resolve = resolveList[ ev.Which ];

Intent launcherIntent = new Intent();

launcherIntent.SetClassName(
resolve.ActivityInfo.PackageName, resolve.ActivityInfo.Name );
launcherIntent.AddCategory( Intent.CategoryLauncher );

StartActivity( launcherIntent );

Hope that helps...


On 5 April 2012 20:32, Natanael  wrote:

> Hello friends.
>  I am developing a simple launcher type KIOSK, seeking a way out of KIOSK
> and return to the Tablet operating system.
>  Any idea?
>
>  My routine and Manisfest below.
>
> using System;
> using Android.App;
> using Android.Content;
> using Android.Runtime;
> using Android.Views;
> using Android.Widget;
> using Android.OS;
> using Android.Content.PM;
>
> namespace Demo
> {
>[Activity(Label = "MY SIMPLE LAUCHER", MainLauncher = true, Icon =
> "@drawable/icon")]
>public class MyActivity : Activity
>{
>protected override void OnCreate(Bundle bundle)
>{
>base.OnCreate(bundle);
>
>// Set our view from the "main" layout resource
>SetContentView(Resource.Layout.Main);
>
>// Get our button from the layout resource,
>// and attach an event to it
>carregaBotoes();
>}
>
>private void carregaBotoes()
>{
>Button button = FindViewById(Resource.Id.MyButton);
>button.Click += delegate
>{
>
>Intent localIntent = Intent;
>Bundle localBundle = new Bundle();
>localBundle.PutInt("Exit", 1);
>localIntent.PutExtras(localBundle);
>SetResult(Result.Canceled, localIntent);
>
>localIntent.RemoveCategory("android.intent.category.HOME");
>
> localIntent.RemoveCategory("android.intent.category.DEFAULT");
>base.Finish();
>
>PackageManager pm;
>
>IntentFilter filter = new IntentFilter();
>
>filter.AddAction("android.intent.action.MAIN");
>filter.AddCategory("android.intent.category.HOME");
>filter.AddCategory("android.intent.category.DEFAULT");
>
>Context context = this;
>pm = context.PackageManager;
>ComponentName component = new
> ComponentName("com.launcher.mylauncher", ".MyActivity");
>ComponentName[] components = new ComponentName[] { new
> ComponentName("com.android.launcher","com.android.launcher2.Launcher"),
> component };
>
> pm.ClearPackagePreferredActivities("com.launcher.mylauncher");
>pm.AddPreferredActivity(filter, Convert.ToInt32(
> Android.Content.MatchResults.MatchCategoryEmpty ) , components, component);
>
>};
>}
>
>protected override void OnDestroy()
>{
>base.OnDestroy();
>Android.OS.Process.KillProcess(Android.OS.Process.MyPid());
>}
>
>}
>
> }
>
>
>
> //- Manifest.xml
>
> 
> http://schemas.android.com/apk/res/android";
> package="com.launcher.mylauncher"
>  android:installLocation="internalOnly"
>  android:versionCode="1"
>  android:versionName="1">
>  -android:persistent="true"
>   android:label="Launcher">
>  android:label="MY Simple Launcher - Kiosk"
>  android:stateNotNeeded="true"
>  android:launchMode="singleInstance">
>  
>
>
>
>
>  
>
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>   />
>   />
>  
>  
>   android:name="android.permission.SET_PREFERRED_APPLICATIONS" />
>  
>   android:name="android.permission.KILL_BACKGROUND_PROCESSES" />
> 
>
>
>
> --
> View this message in context:
> http://mono-for-android.1047100.n5.nabble.com/Simple-LAUNCHER-KIOSK-tp5621309p5621309.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
>



-- 
Gonçalo Oliveira
___
Monodroid mailing list
Monodroid@lists.ximian.com

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


[mono-android] SSL issues

2012-04-10 Thread Goncalo Oliveira
Hi,

Are there still issues with SSL in monodroid? I'm having a zero status code
when accessing an SSL rest service. I know that in the past there was a bug
related to this; was it fixed?

Cheers


-- 
Gonçalo Oliveira
___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] MonoDevelop 2.9.4 and Mono for Android 4.1 - Build Error

2012-04-10 Thread kizanlik
Hello Jonathan,

I'm sorry. I came here with the same result.

Do you know that if there is a link to download the alpha version directly?
May be, alpha version installation from scratch rather than updating from
alpha channel solves this problem.

Thank you...

kizanlik

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/MonoDevelop-2-9-4-and-Mono-for-Android-4-1-Build-Error-tp5627320p5629850.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] 4.1 and r18

2012-04-10 Thread Wally McClure

I have installed 4.1 onto a system running Win7 x64.  Yesterday, I 
installed/updated to Google Android SDK r18.  In VS, when I select f5 to start 
up a debug session, VS acts like it is compiling, then I get an immediate 
"Deploy Succeeded" message in VS, but nothing happens.  Has anyone else seen 
this behavior?
Wally ___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] 4.1 and r18

2012-04-10 Thread Jonathan Pobst
If it's an pre-4.1 project, make sure Deploy is selected for your 
project in Configuration Manager.


Jonathan

On 4/10/2012 9:13 AM, Wally McClure wrote:

I have installed 4.1 onto a system running Win7 x64. Yesterday, I
installed/updated to Google Android SDK r18. In VS, when I select f5 to
start up a debug session, VS acts like it is compiling, then I get an
immediate "Deploy Succeeded" message in VS, but nothing happens. Has
anyone else seen this behavior?

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


Re: [mono-android] VS 2010 with Mono for Android crashes on debugging

2012-04-10 Thread Jonathan Pobst
I cannot reproduce this.  When I try the same, the debugger pauses at 
the exception, highlights it green, and shows an Unhandled Exception 
dialog telling about the exception. (Win 7 64 bit, Nexus One)


Does your snippet reproduce the bug for you, or is it more complicated 
like maybe the exception is being thrown from a background thread or 
something?


Jonathan


On 4/5/2012 7:20 AM, martze wrote:

Hi,

this morning VS 2010 notified me of an update for mono for android, and i
installed it. Since then VS keeps crashing. More precisely:
- When i debug on device, VS crashes as soon as an IndexOutOfRangeException
is thrown. I tested the following snippet on 3 devices (Samsung Galaxy SII
i9100g, Samsung Galaxy S, HTC Desire S). When I test on an emulator, the
debugger silently closes the connection, and the app crashes.

Snippet:

using System;
using Android.App;
using Android.OS;

namespace Testprojekt
{
[Activity(Label = "Testprojekt", MainLauncher = true)]
public class TestActivity : Activity
{
protected override void OnCreate(Bundle bundle)
{
throw (new IndexOutOfRangeException());
}
}
}

I'm using:

MS Win 7 Enterprise
6.1.7601  SP1 build 7601
MS Visual Studio 2010 Premium:
10.0.40219.1 SP1Rel
MS .NET Framework
4.0.30319 SP1Rel
Mono for Android 4.0.6

Devices:

Samsung Galaxy SII i9100g (Android 2.3.6)
Samsung Galaxy S  (Android 2.3.3)
HTC Desire S (didn't check version, borrowed)

Can anyone reproduce or (better) tell me a solution for that problem?

Thank you

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/VS-2010-with-Mono-for-Android-crashes-on-debugging-tp5620230p5620230.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] 4.1 and r18

2012-04-10 Thread Wally McClure

I take it that you are referring to the config manager in a solution.  I have 
checked my project and the deploy checkbox is selected.  any other ideas?
Wally

> Date: Tue, 10 Apr 2012 09:42:18 -0500
> From: mon...@jpobst.com
> To: monodroid@lists.ximian.com
> CC: theevilprogram...@hotmail.com
> Subject: Re: [mono-android] 4.1 and r18
> 
> If it's an pre-4.1 project, make sure Deploy is selected for your 
> project in Configuration Manager.
> 
> Jonathan
> 
> On 4/10/2012 9:13 AM, Wally McClure wrote:
> > I have installed 4.1 onto a system running Win7 x64. Yesterday, I
> > installed/updated to Google Android SDK r18. In VS, when I select f5 to
> > start up a debug session, VS acts like it is compiling, then I get an
> > immediate "Deploy Succeeded" message in VS, but nothing happens. Has
> > anyone else seen this behavior?
> >
> > 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


Re: [mono-android] 4.1 and r18

2012-04-10 Thread Jonathan Pobst

Can you provide the contents of the Output pane?

Jonathan

On 4/10/2012 9:56 AM, Wally McClure wrote:

I take it that you are referring to the config manager in a solution. I
have checked my project and the deploy checkbox is selected. any other
ideas?

Wally

 > Date: Tue, 10 Apr 2012 09:42:18 -0500
 > From: mon...@jpobst.com
 > To: monodroid@lists.ximian.com
 > CC: theevilprogram...@hotmail.com
 > Subject: Re: [mono-android] 4.1 and r18
 >
 > If it's an pre-4.1 project, make sure Deploy is selected for your
 > project in Configuration Manager.
 >
 > Jonathan
 >
 > On 4/10/2012 9:13 AM, Wally McClure wrote:
 > > I have installed 4.1 onto a system running Win7 x64. Yesterday, I
 > > installed/updated to Google Android SDK r18. In VS, when I select f5 to
 > > start up a debug session, VS acts like it is compiling, then I get an
 > > immediate "Deploy Succeeded" message in VS, but nothing happens. Has
 > > anyone else seen this behavior?
 > >
 > > 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


Re: [mono-android] 4.1 and r18

2012-04-10 Thread Wally McClure

I just tried this with a brand new project and got the same result.  In the 
output pane: http://pastebin.com/QCjg1Fgz Wally
 > Date: Tue, 10 Apr 2012 10:01:55 -0500
> From: mon...@jpobst.com
> To: theevilprogram...@hotmail.com
> CC: monodroid@lists.ximian.com
> Subject: Re: [mono-android] 4.1 and r18
> 
> Can you provide the contents of the Output pane?
> 
> Jonathan
> 
> On 4/10/2012 9:56 AM, Wally McClure wrote:
> > I take it that you are referring to the config manager in a solution. I
> > have checked my project and the deploy checkbox is selected. any other
> > ideas?
> >
> > Wally
> >
> >  > Date: Tue, 10 Apr 2012 09:42:18 -0500
> >  > From: mon...@jpobst.com
> >  > To: monodroid@lists.ximian.com
> >  > CC: theevilprogram...@hotmail.com
> >  > Subject: Re: [mono-android] 4.1 and r18
> >  >
> >  > If it's an pre-4.1 project, make sure Deploy is selected for your
> >  > project in Configuration Manager.
> >  >
> >  > Jonathan
> >  >
> >  > On 4/10/2012 9:13 AM, Wally McClure wrote:
> >  > > I have installed 4.1 onto a system running Win7 x64. Yesterday, I
> >  > > installed/updated to Google Android SDK r18. In VS, when I select f5 to
> >  > > start up a debug session, VS acts like it is compiling, then I get an
> >  > > immediate "Deploy Succeeded" message in VS, but nothing happens. Has
> >  > > anyone else seen this behavior?
> >  > >
> >  > > 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


Re: [mono-android] 4.1 and r18

2012-04-10 Thread Jonathan Pobst
The build definitely looks to be succeeding, your app .dll should exist 
in bin\Debug\.


However, it's still not trying to deploy the project.

Can you try doing Build->Package  for Android and ensure that it 
can build the .apk correctly?


Jonathan


On 4/10/2012 10:07 AM, Wally McClure wrote:

I just tried this with a brand new project and got the same result. In
the output pane: http://pastebin.com/QCjg1Fgz

Wally

 > Date: Tue, 10 Apr 2012 10:01:55 -0500
 > From: mon...@jpobst.com
 > To: theevilprogram...@hotmail.com
 > CC: monodroid@lists.ximian.com
 > Subject: Re: [mono-android] 4.1 and r18
 >
 > Can you provide the contents of the Output pane?
 >
 > Jonathan
 >
 > On 4/10/2012 9:56 AM, Wally McClure wrote:
 > > I take it that you are referring to the config manager in a solution. I
 > > have checked my project and the deploy checkbox is selected. any other
 > > ideas?
 > >
 > > Wally
 > >
 > > > Date: Tue, 10 Apr 2012 09:42:18 -0500
 > > > From: mon...@jpobst.com
 > > > To: monodroid@lists.ximian.com
 > > > CC: theevilprogram...@hotmail.com
 > > > Subject: Re: [mono-android] 4.1 and r18
 > > >
 > > > If it's an pre-4.1 project, make sure Deploy is selected for your
 > > > project in Configuration Manager.
 > > >
 > > > Jonathan
 > > >
 > > > On 4/10/2012 9:13 AM, Wally McClure wrote:
 > > > > I have installed 4.1 onto a system running Win7 x64. Yesterday, I
 > > > > installed/updated to Google Android SDK r18. In VS, when I
select f5 to
 > > > > start up a debug session, VS acts like it is compiling, then I
get an
 > > > > immediate "Deploy Succeeded" message in VS, but nothing
happens. Has
 > > > > anyone else seen this behavior?
 > > > >
 > > > > 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


Re: [mono-android] 4.1 and r18

2012-04-10 Thread Jonathan Pobst

Oh, I completely missed this:

Build succeeded.

Time Elapsed 00:00:00.03
Error: Object reference not set to an instance of an object.
== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==
== Deploy: 0 succeeded, 0 failed, 0 skipped ==

Not sure what that error is, I'll see if I can find anything in the code.

Jonathan


On 4/10/2012 10:07 AM, Wally McClure wrote:

I just tried this with a brand new project and got the same result. In
the output pane: http://pastebin.com/QCjg1Fgz

Wally

 > Date: Tue, 10 Apr 2012 10:01:55 -0500
 > From: mon...@jpobst.com
 > To: theevilprogram...@hotmail.com
 > CC: monodroid@lists.ximian.com
 > Subject: Re: [mono-android] 4.1 and r18
 >
 > Can you provide the contents of the Output pane?
 >
 > Jonathan
 >
 > On 4/10/2012 9:56 AM, Wally McClure wrote:
 > > I take it that you are referring to the config manager in a solution. I
 > > have checked my project and the deploy checkbox is selected. any other
 > > ideas?
 > >
 > > Wally
 > >
 > > > Date: Tue, 10 Apr 2012 09:42:18 -0500
 > > > From: mon...@jpobst.com
 > > > To: monodroid@lists.ximian.com
 > > > CC: theevilprogram...@hotmail.com
 > > > Subject: Re: [mono-android] 4.1 and r18
 > > >
 > > > If it's an pre-4.1 project, make sure Deploy is selected for your
 > > > project in Configuration Manager.
 > > >
 > > > Jonathan
 > > >
 > > > On 4/10/2012 9:13 AM, Wally McClure wrote:
 > > > > I have installed 4.1 onto a system running Win7 x64. Yesterday, I
 > > > > installed/updated to Google Android SDK r18. In VS, when I
select f5 to
 > > > > start up a debug session, VS acts like it is compiling, then I
get an
 > > > > immediate "Deploy Succeeded" message in VS, but nothing
happens. Has
 > > > > anyone else seen this behavior?
 > > > >
 > > > > 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


Re: [mono-android] 4.1 and r18

2012-04-10 Thread Wally McClure

Apologies for not pointing that out.  Had a distraction at the moment, so I 
just hit send. Wally
 > Date: Tue, 10 Apr 2012 10:17:08 -0500
> From: mon...@jpobst.com
> To: theevilprogram...@hotmail.com
> CC: monodroid@lists.ximian.com
> Subject: Re: [mono-android] 4.1 and r18
> 
> Oh, I completely missed this:
> 
> Build succeeded.
> 
> Time Elapsed 00:00:00.03
> Error: Object reference not set to an instance of an object.
> == Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==
> == Deploy: 0 succeeded, 0 failed, 0 skipped ==
> 
> Not sure what that error is, I'll see if I can find anything in the code.
> 
> Jonathan
> 
> 
> On 4/10/2012 10:07 AM, Wally McClure wrote:
> > I just tried this with a brand new project and got the same result. In
> > the output pane: http://pastebin.com/QCjg1Fgz
> >
> > Wally
> >
> >  > Date: Tue, 10 Apr 2012 10:01:55 -0500
> >  > From: mon...@jpobst.com
> >  > To: theevilprogram...@hotmail.com
> >  > CC: monodroid@lists.ximian.com
> >  > Subject: Re: [mono-android] 4.1 and r18
> >  >
> >  > Can you provide the contents of the Output pane?
> >  >
> >  > Jonathan
> >  >
> >  > On 4/10/2012 9:56 AM, Wally McClure wrote:
> >  > > I take it that you are referring to the config manager in a solution. I
> >  > > have checked my project and the deploy checkbox is selected. any other
> >  > > ideas?
> >  > >
> >  > > Wally
> >  > >
> >  > > > Date: Tue, 10 Apr 2012 09:42:18 -0500
> >  > > > From: mon...@jpobst.com
> >  > > > To: monodroid@lists.ximian.com
> >  > > > CC: theevilprogram...@hotmail.com
> >  > > > Subject: Re: [mono-android] 4.1 and r18
> >  > > >
> >  > > > If it's an pre-4.1 project, make sure Deploy is selected for your
> >  > > > project in Configuration Manager.
> >  > > >
> >  > > > Jonathan
> >  > > >
> >  > > > On 4/10/2012 9:13 AM, Wally McClure wrote:
> >  > > > > I have installed 4.1 onto a system running Win7 x64. Yesterday, I
> >  > > > > installed/updated to Google Android SDK r18. In VS, when I
> > select f5 to
> >  > > > > start up a debug session, VS acts like it is compiling, then I
> > get an
> >  > > > > immediate "Deploy Succeeded" message in VS, but nothing
> > happens. Has
> >  > > > > anyone else seen this behavior?
> >  > > > >
> >  > > > > 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


Re: [mono-android] 4.1 and r18

2012-04-10 Thread Wally McClure

Also, I'm getting this error in a brand new project as well as an existing 
project. Wally
 From: theevilprogram...@hotmail.com
To: mon...@jpobst.com
Date: Tue, 10 Apr 2012 11:18:56 -0400
CC: monodroid@lists.ximian.com
Subject: Re: [mono-android] 4.1 and r18







Apologies for not pointing that out.  Had a distraction at the moment, so I 
just hit send.
 
Wally
 
> Date: Tue, 10 Apr 2012 10:17:08 -0500
> From: mon...@jpobst.com
> To: theevilprogram...@hotmail.com
> CC: monodroid@lists.ximian.com
> Subject: Re: [mono-android] 4.1 and r18
> 
> Oh, I completely missed this:
> 
> Build succeeded.
> 
> Time Elapsed 00:00:00.03
> Error: Object reference not set to an instance of an object.
> == Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==
> == Deploy: 0 succeeded, 0 failed, 0 skipped ==
> 
> Not sure what that error is, I'll see if I can find anything in the code.
> 
> Jonathan
> 
> 
> On 4/10/2012 10:07 AM, Wally McClure wrote:
> > I just tried this with a brand new project and got the same result. In
> > the output pane: http://pastebin.com/QCjg1Fgz
> >
> > Wally
> >
> >  > Date: Tue, 10 Apr 2012 10:01:55 -0500
> >  > From: mon...@jpobst.com
> >  > To: theevilprogram...@hotmail.com
> >  > CC: monodroid@lists.ximian.com
> >  > Subject: Re: [mono-android] 4.1 and r18
> >  >
> >  > Can you provide the contents of the Output pane?
> >  >
> >  > Jonathan
> >  >
> >  > On 4/10/2012 9:56 AM, Wally McClure wrote:
> >  > > I take it that you are referring to the config manager in a solution. I
> >  > > have checked my project and the deploy checkbox is selected. any other
> >  > > ideas?
> >  > >
> >  > > Wally
> >  > >
> >  > > > Date: Tue, 10 Apr 2012 09:42:18 -0500
> >  > > > From: mon...@jpobst.com
> >  > > > To: monodroid@lists.ximian.com
> >  > > > CC: theevilprogram...@hotmail.com
> >  > > > Subject: Re: [mono-android] 4.1 and r18
> >  > > >
> >  > > > If it's an pre-4.1 project, make sure Deploy is selected for your
> >  > > > project in Configuration Manager.
> >  > > >
> >  > > > Jonathan
> >  > > >
> >  > > > On 4/10/2012 9:13 AM, Wally McClure wrote:
> >  > > > > I have installed 4.1 onto a system running Win7 x64. Yesterday, I
> >  > > > > installed/updated to Google Android SDK r18. In VS, when I
> > select f5 to
> >  > > > > start up a debug session, VS acts like it is compiling, then I
> > get an
> >  > > > > immediate "Deploy Succeeded" message in VS, but nothing
> > happens. Has
> >  > > > > anyone else seen this behavior?
> >  > > > >
> >  > > > > 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


Re: [mono-android] New Binding Generator

2012-04-10 Thread Matt
I didn't realize the fix you mentioned was in the binding generator. Will
this be in the next alpha release?

Thanks,
Matt

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/New-Binding-Generator-tp5623432p5630407.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] New Binding Generator

2012-04-10 Thread Atsushi Eno
Yes it will. It shouldn't take long (like a month) until the next 
preview release.


Atsushi Eno

Matt wrote:

I didn't realize the fix you mentioned was in the binding generator. Will
this be in the next alpha release?

Thanks,
Matt

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/New-Binding-Generator-tp5623432p5630407.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] setting up the emulator - installing mono and the platform framework

2012-04-10 Thread Wally McClure




Is there anyway to speed up the installation of mono and the platform framework 
into the emulator?  I realize that this is not something that is done very 
often, but it seems to take 20-30 minutes here, and my machines aren't bottom 
of the barrel.  Is there any setting that I can use that might help this? Wally 
 ___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] SSL issues

2012-04-10 Thread Jonathan Pryor
On Apr 10, 2012, at 5:41 AM, Goncalo Oliveira wrote:
> Are there still issues with SSL in monodroid? I'm having a zero status code 
> when accessing an SSL rest service. I know that in the past there was a bug 
> related to this; was it fixed?

I'm not aware of any current issues with SSL, in that our tests check for 
accessing an HTTPS site:


https://github.com/xamarin/monodroid-samples/blob/master/SanityTests/Hello.cs#L720

However, it does require that Android accept the SSL certificates that your 
site is using. A good way to check this is to open Android's Browser and go to 
your HTTPS site: if Browser shows a dialog asking you to accept the 
certificate, then it will NOT work as-is in Mono for Android.

If you need to accept "arbitrary" certificates, you should instead use the 
ServicePointManager.ServerCertificateValidationCallback property to manually 
validate the SSL certificate and accept or deny it:


http://androidapi.xamarin.com/?link=P%3aSystem.Net.ServicePointManager.ServerCertificateValidationCallback

Thanks,
 - Jon

___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] setting up the emulator - installing mono and the platform framework

2012-04-10 Thread Jonathan Pryor
On Apr 10, 2012, at 1:08 PM, Wally McClure wrote:
> Is there anyway to speed up the installation of mono and the platform 
> framework into the emulator?

4.1.0 should have helped with this, at least a little bit:


http://docs.xamarin.com/android/Releases/Mono_For_Android_4/Mono_for_Android_4.1.0#Smaller_Shared_Runtime

However, we're still sending several MB of data to the emulator, so that's 
going to be slow.

> but it seems to take 20-30 minutes here

That's rather odd; the last time I did this it seemed to take closer to 10 
minutes or less. :-/

 - Jon

___
Monodroid mailing list
Monodroid@lists.ximian.com

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


[mono-android] r18 and 4.1.0 - seeing an emulator session

2012-04-10 Thread Wally McClure




I tend to start my emulator sessions manually with all the appropiate 
parameters.  I'm not sure when this start happening, but I am seeing that with 
r18 and 4.1.0, that when I start a debug session, mfa doesn't always see the 
emulator sessions.  It didn't see them yesterday, saw them earlier, and now 
doesn't see them.  Previously, I had just killed adb and restarted the service 
and that fixed this problem, unfortunately, this does not help now. Wally   
 ___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] SSL issues

2012-04-10 Thread Goncalo Oliveira
Thanks Jon,

The certificate is indeed a development certificate, therefore, a
self-signed certificate. I'll check the callback in the ServicePointManager.

Cheers,


On 10 April 2012 18:13, Jonathan Pryor  wrote:

> On Apr 10, 2012, at 5:41 AM, Goncalo Oliveira wrote:
> > Are there still issues with SSL in monodroid? I'm having a zero status
> code when accessing an SSL rest service. I know that in the past there was
> a bug related to this; was it fixed?
>
> I'm not aware of any current issues with SSL, in that our tests check for
> accessing an HTTPS site:
>
>
> https://github.com/xamarin/monodroid-samples/blob/master/SanityTests/Hello.cs#L720
>
> However, it does require that Android accept the SSL certificates that
> your site is using. A good way to check this is to open Android's Browser
> and go to your HTTPS site: if Browser shows a dialog asking you to accept
> the certificate, then it will NOT work as-is in Mono for Android.
>
> If you need to accept "arbitrary" certificates, you should instead use the
> ServicePointManager.ServerCertificateValidationCallback property to
> manually validate the SSL certificate and accept or deny it:
>
>
> http://androidapi.xamarin.com/?link=P%3aSystem.Net.ServicePointManager.ServerCertificateValidationCallback
>
> Thanks,
>  - Jon
>
> ___
> Monodroid mailing list
> Monodroid@lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
>



-- 
Gonçalo Oliveira
___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] r18 and 4.1.0 - seeing an emulator session

2012-04-10 Thread Wally McClure

Closing and reopening VS seems to have cleared this.  VS gave me a message that 
there was a background operation happening that closing would stop the 
background operation.  When I reopened VS, everything seemed to work. 
WallyFrom: theevilprogram...@hotmail.com
To: monodroid@lists.ximian.com
Date: Tue, 10 Apr 2012 13:36:39 -0400
Subject: [mono-android] r18 and 4.1.0 - seeing an emulator session










I tend to start my emulator sessions manually with all the appropiate 
parameters.  I'm not sure when this start happening, but I am seeing that with 
r18 and 4.1.0, that when I start a debug session, mfa doesn't always see the 
emulator sessions.  It didn't see them yesterday, saw them earlier, and now 
doesn't see them.  Previously, I had just killed adb and restarted the service 
and that fixed this problem, unfortunately, this does not help now.
 
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


Re: [mono-android] r17 x86 support

2012-04-10 Thread Andreia Gaita
Hi, 

Sorry, 4.1 came out with a bug in the x86 runtime support. The next alpha will 
have this fixed.


andreia gaita
---
blog.worldofcoding.com (http://blog.worldofcoding.com)
github.com/andreiagaita (http://github.com/andreiagaita)



On Saturday, April 7, 2012 at 11:48 PM, Joshua Barker wrote:

> I have the full version of MFA 4.1 and am trying to use the intel x86
> emulator. It builds and deploys, but when it starts, it throws a
> java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1311]
> error on application start. I have it set to use the shared runtime with no
> linking and am trying to debug. Any ideas?
> 
> 04-07 18:35:08.363 I/ActivityManager( 866): Starting: Intent {
> act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER]
> flg=0x1020
> cmp=MonoAndroidApplication1.MonoAndroidApplication1/monoandroidapplication1.Activity1
> } from pid 1049
> 04-07 18:35:08.374 I/ActivityManager( 866): Start proc
> MonoAndroidApplication1.MonoAndroidApplication1 for activity
> MonoAndroidApplication1.MonoAndroidApplication1/monoandroidapplication1.Activity1:
> pid=4740 uid=10033 gids={3003, 1015}
> 04-07 18:35:08.374 I/ActivityThread( 4740): Pub
> MonoAndroidApplication1.MonoAndroidApplication1.__mono_init__:
> mono.MonoRuntimeProvider
> 04-07 18:35:08.374 D/dalvikvm( 4740): Trying to load lib
> /data/data/MonoAndroidApplication1.MonoAndroidApplication1/lib/libmonodroid.so
> 0xb6d78148
> 04-07 18:35:08.374 D/AndroidRuntime( 4740): Shutting down VM
> 04-07 18:35:08.374 W/dalvikvm( 4740): threadid=1: thread exiting with
> uncaught exception (group=0xb68784f0)
> 04-07 18:35:08.374 E/AndroidRuntime( 4740): FATAL EXCEPTION: main
> 04-07 18:35:08.374 E/AndroidRuntime( 4740): java.lang.UnsatisfiedLinkError:
> Cannot load library: reloc_library[1311]: 803 cannot locate 'connect'...
> 04-07 18:35:08.374 E/AndroidRuntime( 4740): 
> 04-07 18:35:08.374 E/AndroidRuntime( 4740): at
> java.lang.Runtime.loadLibrary(Runtime.java:434)
> 04-07 18:35:08.374 E/AndroidRuntime( 4740): at
> java.lang.System.loadLibrary(System.java:554)
> 04-07 18:35:08.374 E/AndroidRuntime( 4740): at
> mono.MonoPackageManager.LoadApplication(MonoPackageManager.java:24)
> 04-07 18:35:08.374 E/AndroidRuntime( 4740): at
> mono.MonoRuntimeProvider.attachInfo(MonoRuntimeProvider.java:25)
> 04-07 18:35:08.374 E/AndroidRuntime( 4740): at
> android.app.ActivityThread.installProvider(ActivityThread.java:3554)
> 04-07 18:35:08.374 E/AndroidRuntime( 4740): at
> android.app.ActivityThread.installContentProviders(ActivityThread.java:3309)
> 04-07 18:35:08.374 E/AndroidRuntime( 4740): at
> android.app.ActivityThread.handleBindApplication(ActivityThread.java:3265)
> 04-07 18:35:08.374 E/AndroidRuntime( 4740): at
> android.app.ActivityThread.access$2200(ActivityThread.java:117)
> 04-07 18:35:08.374 E/AndroidRuntime( 4740): at
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:969)
> 04-07 18:35:08.374 E/AndroidRuntime( 4740): at
> android.os.Handler.dispatchMessage(Handler.java:99)
> 04-07 18:35:08.374 E/AndroidRuntime( 4740): at
> android.os.Looper.loop(Looper.java:130)
> 04-07 18:35:08.374 E/AndroidRuntime( 4740): at
> android.app.ActivityThread.main(ActivityThread.java:3683)
> 04-07 18:35:08.374 E/AndroidRuntime( 4740): at
> java.lang.reflect.Method.invokeNative(Native Method)
> 04-07 18:35:08.374 E/AndroidRuntime( 4740): at
> java.lang.reflect.Method.invoke(Method.java:507)
> 04-07 18:35:08.374 E/AndroidRuntime( 4740): at
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
> 04-07 18:35:08.374 E/AndroidRuntime( 4740): at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
> 04-07 18:35:08.374 E/AndroidRuntime( 4740): at
> dalvik.system.NativeStart.main(Native Method)
> 04-07 18:35:08.415 W/ActivityManager( 866): Force finishing activity
> MonoAndroidApplication1.MonoAndroidApplication1/monoandroidapplication1.Activity1
> 04-07 18:35:08.976 W/ActivityManager( 866): Activity pause timeout for
> HistoryRecord{b702c748
> MonoAndroidApplication1.MonoAndroidApplication1/monoandroidapplication1.Activity1}
> 04-07 18:35:18.993 W/ActivityManager( 866): Activity destroy timeout for
> HistoryRecord{b702c748
> MonoAndroidApplication1.MonoAndroidApplication1/monoandroidapplication1.Activity1}
> 
> --
> View this message in context: 
> http://mono-for-android.1047100.n5.nabble.com/r17-x86-support-tp5592225p5625207.html
> Sent from the Mono for Android mailing list archive at Nabble.com 
> (http://Nabble.com).
> ___
> Monodroid mailing list
> Monodroid@lists.ximian.com (mailto: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] Socket Problem

2012-04-10 Thread Jonathan Pryor
As a guess...

On Apr 6, 2012, at 3:08 AM, mcxxx wrote:
>foreach (System.Net.NetworkInformation.NetworkInterface 
> networkInterface in 
> System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces())

you're hitting:

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

Otherwise, I'm not sure what error you're referring to.

Thanks,
 - Jon

___
Monodroid mailing list
Monodroid@lists.ximian.com

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


[mono-android] How to use MotionEvent members

2012-04-10 Thread King Coffee
Hi fellow developers,

I'm trying to convert an android java example code snippet to a C# code
snippet.
The java snippet uses Enums like: MotionEvent.ACTION_MASK and
MotionEvent.ACTION_DOWN.

Mono uses the default class android.Views.MotionEvent, which does not
contain these field constants.

So, how and I fix the code snippet below:
 
   public override bool OnTouchEvent(MotionEvent eve)
{
base.OnTouchEvent(eve);

int action = eve.Action & MotionEvent.ACTION_MASK;

switch (action)
{
case MotionEvent.ACTION_DOWN:
{
   
System.Diagnostics.Debug.WriteLine("MultitouchExample: Action Down");
mTouchStart = DateTime.Now.Millisecond;
}

case MotionEvent.ACTION_MOVE:
{
   
System.Diagnostics.Debug.WriteLine("MultitouchExample: Action Move");
break;
}

  ...
  ...

I defined a generic image GestureListener of the form:

public class MyImageListener 
{
 MultiTouchGestureListener m_oMultiTouchGestureListener;
 SingleTouchGestureListener m_oSingleTouchGestureListener;
 ScaleGestureDetector m_gestures;
 GestureDetector m_singleTouchGestures;
ImageView image;
Context context;
 
public MyImageListener(Context context, ImageView image)
{
this.context = context;
this.image = image;

// create gesture detector to capture single touch gestures
m_oSingleTouchGestureListener = new
SingleTouchGestureListener(image);
m_singleTouchGestures = new GestureDetector(context,
m_oSingleTouchGestureListener);

// Create scale gesture detector to capture multi-touch gestures
m_oMultiTouchGestureListener = new
MultiTouchGestureListener(image);
m_gestures = new ScaleGestureDetector(context,
m_oMultiTouchGestureListener);
}

public override bool OnTouchEvent(MotionEvent eve)
{
 bool bAccepted = false;

 bAccepted = m_singleTouchGestures.OnTouchEvent(eve);  // single
touch gestures
 if (bAccepted) return bAccepted;

 m_oMultiTouchGestureListener.setMotionEvent(eve);
 bAccepted = m_gestures.OnTouchEvent(eve);  // multi-touch or
scale events
 return bAccepted;
   }

Thanks,
King Coffee


--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/How-to-use-MotionEvent-members-tp5630688p5630688.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] Missing overload of Html.FromHtml

2012-04-10 Thread Jonathan Pryor
On Apr 4, 2012, at 7:49 PM, psryland wrote:
> Is there a way to access the second overload perhaps with a little JNI voodoo?

Unfortunately it wasn't exposed because we're not currently binding the 
org.xml.sax.XMLReader interface, which prevents binding the Html.TagHandler 
interface.

If you don't need the Html.TagHandler interface, then you can hand-bind the 
fromHtml method you want (untested):

IntPtr Html = JNIEnv.FindClass(typeof(Html));
IntPtr fromHtml = JNIEnv.GetStaticMethodID(
Html,
"fromHtml",

"(Ljava/lang/String;Landroid/text/Html$ImageGetter;Landroid/text/Html$TagHandler;)Landroid/text/Spanned;");
IntPtr r = JNIEnv.CallStaticObjectMethod(
Html,
fromHtml,
new JValue(source), new JValue(IntPtr.Zero), new 
JValue(IntPtr.Zero));
JNIEnv.DeleteGlobalRef (Html);
var spanned = Java.Lang.Object.GetObject(r, 
JniHandleOwnership.TransferLocalRef);

See also:


http://docs.xamarin.com/android/advanced_topics/Binding_Android_Types#Looking_up_Java_Types

http://docs.xamarin.com/android/advanced_topics/Binding_Android_Types#Static_Methods

http://docs.xamarin.com/android/advanced_topics/Binding_Android_Types#Type_References

http://docs.xamarin.com/android/advanced_topics/Binding_Android_Types#Using_Java.Lang.Object.GetObject.3cT.3e()

 - Jon

___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] How to use MotionEvent members

2012-04-10 Thread Jonathan Pryor
On Apr 10, 2012, at 2:07 PM, King Coffee wrote:
> I'm trying to convert an android java example code snippet to a C# code 
> snippet. The java snippet uses Enums like: MotionEvent.ACTION_MASK and 
> MotionEvent.ACTION_DOWN.

Those were moved to the Android.Views.MotionEventActions enumeration, which is 
also the type of the MotionEvent.Action property.

Within MonoDevelop (and presumably Visual Studio) if you do:

eve.Action ==

the IDE will suggest MotionEventActions values. (Not sure why MonoDevelop 
doesn't suggest those values when using `&`...)

> So, how and I fix the code snippet below:
> 
>   public override bool OnTouchEvent(MotionEvent eve)
>{
>base.OnTouchEvent(eve);
> 
>int action = eve.Action & MotionEvent.ACTION_MASK;

var action = e.Action & MotionEventActions.Mask;
// or: var action = e.ActionMasked;
 switch (action) {
case MotionEventActions.Down: ...
case MotionEventActions.Move: ...
}

> I defined a generic image GestureListener of the form:
> 
>public class MyImageListener 

You don't list any base classes, yet...

>public override bool OnTouchEvent(MotionEvent eve)

you're overriding a method? I'm not sure how that works. ;-)

One thing to keep in mind: when implementing Android interfaces, in particular 
when implementing IJavaObject, DO NOT IMPLEMENT IJavaObject! Subclass 
Java.Lang.Object instead:

http://docs.monodroid.net/index.aspx?link=T:Android.Runtime.IJavaObject

http://docs.xamarin.com/android/advanced_topics/architecture/android_callable_wrappers

Failure to do so will result in weird runtime errors, frequently resembling 
NullPointerExceptions (assuming the common approach of making 
IJavaObject.Handle return IntPtr.Zero...).

 - Jon

___
Monodroid mailing list
Monodroid@lists.ximian.com

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


[mono-android] Modal window

2012-04-10 Thread Paul Johnson

Hi,

I've found this on stackoverflow on implementing a modal window...

http://stackoverflow.com/questions/6120567/android-how-to-get-a-modal-dialog-or-similar-modal-behavior

The bottom example is simple enough to port to C#, but I have a few 
questions.


1.
private Method mMsgQueueNextMethod = null;
private Field mMsgTargetFiled = null;

By the looks of it mMsgQueueNextMethod is kind of like an Intent ore 
than anything. Not sure what Field equates to (var?)


2.
Class clsMsgQueue = null;
Class clsMessage = null;

By the looks Class is roughly var - is it?

3. Can we do the likes of

builder.setNegativeButton("Cancel", new 
DialogInterface.OnClickListener() {

public void onClick(DialogInterface dialog, int id) {
ModalDialog.this.mQuitModal = true;
ModalDialog.this.mChoice = false;
dialog.cancel();
}

?

DialogInterface doesn't have an OnClickListener, so I'd need to 
implement one.


Comments welcome :)

Paul
___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] GetResponseStream().ReadToEnd Fatal Exception

2012-04-10 Thread Jonathan Pryor
On Apr 9, 2012, at 1:05 PM, emalamisura wrote:
> So I posted about this earlier where ReadToEnd will throw an exception 
> randomly and rather rare, but it is indeed happening.  It happened last 
> night, and nothing is logged to LogCat, absolutely nothing.

Could you try this on the 4.1.0 alpha? I know of a GC bridge code fix in that 
release, though I'm not seeing any Java code in there so I'm not sure why it 
would be involved...

Otherwise, I'm afraid that we'll need to ask for a self-contained test case so 
that we can investigate further. :-(

 - Jon

___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] Modal window

2012-04-10 Thread Jonathan Pryor
On Apr 10, 2012, at 3:37 PM, Paul Johnson wrote:
> The bottom example is simple enough to port to C#, but I have a few questions.
> 
> 1.
> private Method mMsgQueueNextMethod = null;
> private Field mMsgTargetFiled = null;
> 
> By the looks of it mMsgQueueNextMethod is kind of like an Intent ore than 
> anything. Not sure what Field equates to (var?)

Method and Field are from java.lang.reflect, and are not exposed in Mono for 
Android. You'll need to use the JNI equivalents, JNIEnv.GetMethodID() and 
JNIEnv.GetFieldID():


http://docs.xamarin.com/android/advanced_topics/Binding_Android_Types#_Instance_Methods

> 2.
>Class clsMsgQueue = null;
>Class clsMessage = null;
> 
> By the looks Class is roughly var - is it?

You can ignore the generic parameters; this is just a java.lang.Class, which is 
bound as Java.Lang.Class or you can use JNIEnv.FindClass() if appropriate.

> 3. Can we do the likes of
> 
>builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {

AlertDialog.Builder.SetNegativeButton() has an overload which takes an 
EventHandler:


http://androidapi.xamarin.com/?link=M%3aAndroid.App.AlertDialog%2bBuilder.SetNegativeButton(System.String%2cSystem.EventHandler%7bAndroid.Content.DialogClickEventArgs%7d)

allowing:

builder.SetNegativeButton("Cancel", (o, e) => {
mQuitModal = true;
mChoice = false;
dialog.Cancel();
});

Otherwise, you'd need to split that out into a separate class declaration:

class MyClickListener : Java.Lang.Object, 
IDialogInterfaceOnClickListener {
public void OnClick (IDialogInterface dialog, int which) {...}
}

...
builder.SetNegativeButton("Cancel", new MyClickListener());

 - Jon

___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] GetResponseStream().ReadToEnd Fatal Exception

2012-04-10 Thread emalamisura
Hi Jon,

I haven't had the opportunity to compile to the latest Alpha just yet, but I
am planning on doing that this weekend once I tie up some loose ends.  Once
I am on Alpha I will keep an eye out for this, I did some tidying up of the
code above with wrapping the streams in using blocks, removing the finally,
and checking for null in a couple of places.  This will not remove the
premature termination of the connection but I after about 6 hours of
investigation with this I think the following is whats happening:

1. The connection is getting prematurely terminated.
2. This causes an exception of type WebException with message "An error
occurred while processing the request." which aligns with the following MSDN
article:
http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.endgetresponse.aspx
but the reason is uknown...
3. Since I am calling EndGetResponse in an async callback from a seperate
thread the exception is occuring on a background worker thread
4. Since the exception occurs on a background worker thread I am not seeing
the error in this instance, additionally inside my try/catch block I was
attempting to pull out the error message from the WebResponse which was null
5. Since another error occured inside my try/catch it was fatal and uncaught
therefore terminating the application.

So, all in all I do not believe it was not Java related.  Although I am
still unclear why LogCat had no data on the exception...Additionally the
debugger would not offer my a callstack when the exception occured so I
could not trace the issue.

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/GetResponseStream-ReadToEnd-Fatal-Exception-tp5627778p5631328.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] New Binding Generator

2012-04-10 Thread Matt
A month is actually a long time :(. Is there a set date for the final
release?

Thanks,
Matt

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/New-Binding-Generator-tp5623432p5631555.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