Re: [mono-android] WebView Javascript Interface and exposing methods through JNI

2012-01-09 Thread Tomasz Cielecki
Ok, I have been messing around a bit with this JNI stuff and can't
seem to get it to work. The C# code compiles fine, so it must be the
Java code that fails somehow as I get two errors:

"C:\Users\tcielecki\Desktop\MonoDroid.WAToolkit\MonoDroid.WAToolkit\MonoDroid.WAToolkit.Sample.csproj"
(SignAndroidPackage target) (1) ->
(_CompileJava target) ->
  
obj\Debug\android\src\monodroid\watoolkit\library\login\AccessControlWebAuthActivity_AccessControlJavascriptNotify.java(5,43):
javac error :  cannot find symbol
[C:\Users\tcielecki\Desktop\MonoDroid.WAToolkit\MonoDroid.WAToolkit\MonoDroid.WAToolkit.Sample.csproj]
obj\Debug\android\src\monodroid\watoolkit\library\login\AccessControlWebAuthActivity_AccessControlJavascriptNotify.java(5,43):
javac error : symbol  : class AccessControlJavascriptNotify
[C:\Users\tcielecki\Desktop\MonoDroid.WAToolkit\MonoDroid.WAToolkit\MonoDroid.WAToolkit.Sample.csproj]
obj\Debug\android\src\monodroid\watoolkit\library\login\AccessControlWebAuthActivity_AccessControlJavascriptNotify.java(5,43):
javac error : location: package monodroid.watoolkit.library.login
[C:\Users\tcielecki\Desktop\MonoDroid.WAToolkit\MonoDroid.WAToolkit\MonoDroid.WAToolkit.Sample.csproj]
obj\Debug\android\src\monodroid\watoolkit\library\login\AccessControlWebAuthActivity_AccessControlJavascriptNotify.java(5,43):
javac error :   extends
monodroid.watoolkit.library.login.AccessControlJavascriptNotify
[C:\Users\tcielecki\Desktop\MonoDroid.WAToolkit\MonoDroid.WAToolkit\MonoDroid.WAToolkit.Sample.csproj]
obj\Debug\android\src\monodroid\watoolkit\library\login\AccessControlWebAuthActivity_AccessControlJavascriptNotify.java(5,43):
javac error :  
[C:\Users\tcielecki\Desktop\MonoDroid.WAToolkit\MonoDroid.WAToolkit\MonoDroid.WAToolkit.Sample.csproj]
  
obj\Debug\android\src\monodroid\watoolkit\library\login\AccessControlWebAuthActivity_AccessControlJavascriptNotify.java(15,2):
error :  method does not override or implement a method from a
supertype 
[C:\Users\tcielecki\Desktop\MonoDroid.WAToolkit\MonoDroid.WAToolkit\MonoDroid.WAToolkit.Sample.csproj]
obj\Debug\android\src\monodroid\watoolkit\library\login\AccessControlWebAuthActivity_AccessControlJavascriptNotify.java(15,2):
error : @Override
[C:\Users\tcielecki\Desktop\MonoDroid.WAToolkit\MonoDroid.WAToolkit\MonoDroid.WAToolkit.Sample.csproj]
obj\Debug\android\src\monodroid\watoolkit\library\login\AccessControlWebAuthActivity_AccessControlJavascriptNotify.java(15,2):
error :  
[C:\Users\tcielecki\Desktop\MonoDroid.WAToolkit\MonoDroid.WAToolkit\MonoDroid.WAToolkit.Sample.csproj]

Seems to me that it cannot find the java file I created even though I
have set the build action to AndroidJavaSource, can it have anything
to do with that I am doing this in a Mono for Android Class Library?

I have tried to follow the Adder/ManagedAdder samples very closely and
came up with this code, and as I said it compiles just fine.

AccessControlJavascriptNotify.java:

package monodroid.watoolkit.library.login;

public class AccessControlJavascriptNotify
{
public void notify(String securityTokenResponse) { }
}

ManagedAccessControlJavascriptNotify.cs:

using System;
using Android.Runtime;

namespace MonoDroid.WAToolkit.Library.Login
{

[Register("monodroid/watoolkit/library/login/AccessControlJavascriptNotify",
DoNotGenerateAcw = true)]
public abstract class ManagedAccessControlJavascriptNotify : 
Java.Lang.Object
{
static IntPtr class_ref =
JNIEnv.FindClass("monodroid/watoolkit/library/login/AccessControlJavascriptNotify");

public ManagedAccessControlJavascriptNotify ()
{
}

public ManagedAccessControlJavascriptNotify(IntPtr 
handle,
JniHandleOwnership transfer)
: base (handle, transfer)
{
}

protected override Type ThresholdType
{
get { return 
typeof(ManagedAccessControlJavascriptNotify); }
}

protected override IntPtr ThresholdClass
{
get { return class_ref; }
}

#region Notify
static IntPtr id_notify;

[Register("notify", "(Ljava/lang/String;)V", 
"GetNotifyHandler")]
public virtual void Notify(string securityTokenResponse)
{
if (id_notify == IntPtr.Zero)
id_notify = 
JNIEnv.GetMethodID(class_ref, "notify",
"(Ljava/lang/String;)V");
if (GetType() == ThresholdType)
JNIEnv.C

Re: [mono-android] corruption on dates

2012-01-09 Thread John Murray
Yes I've come across it before and it has indeed been just a debugger
irritation
But the issue on this occasion is that my conversions
Myclass.indepdate.ToString("-MM-dd")
Are delivering an empty string 
I have changed the code to place the month year and day into int variables
then constructed my own string format 
This works 


-Original Message-
From: Jonathan Pobst [mailto:mon...@jpobst.com] 
Sent: 08 January 2012 17:39
To: j...@murray.gb.com; Discussions related to Mono for Android
Subject: Re: [mono-android] corruption on dates

The DateTime corruption should just be a display bug for the debugger. 
If you expand the DateTime variable, you should see that all the integer 
values of the DateTime are correct, like Day, Month, Hour, etc.

Jonathan

On 1/8/2012 6:13 AM, John Murray wrote:
> I have a static date field
>
> e.g
>
> public static DateTime Myclass.indepdate =DateTime.Now
>
> I am passing into another method which constructs and executes an SQL
> string
>
> I convert the datetime on passing the parameter to the method thus
>
>
MyOtherclass.checklogbookforGAR(this,Myclass.aircraftreg,Myclass.indepdate.T
oString("-MM-dd"));
>
> When one checks what string turns up in the sql after these parameters
> are passed it is blank
>
> Before calling the method MyClass.indepdate seems to have the correct
> date in it
>
> I cannot check the conversion Myclass.indepdate.ToString("-MM-dd")
>
> Because VS2010 debugger just reports a load of Chinese characters - you
> can tell the correct date is in there by drilling down in the debugger
> to see Myclass.indepdate.month and .year etc but one cannot get a result
> from the above conversion
>
> Am I doing something wrong with my declarations or is this a peculiarity
> of statics or of VS2010
>
> I have noticed before that the debugger has some difficulty with
> converting datetimes on the fly but previously when I've notcided this
> the date conversion gets done properly when the code runs - here the
> conversion is delivering a blank string
>
> Any ideas anyone?
>
> John Murray
>
>
>
> ___
> 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] VisualStudio and AndroidManifest

2012-01-09 Thread Miljenko Cvjetko

Hi

Got back after a while and have some problems with M4A in VS.
Dunno if anybody had similar problems, but this might help someone...

Symptoms

 * Added new-clean MonoForAndroid project to existing VS solution
 o Run/Debug button is disabled.
 o Right click on project gives me no opportunity to run/debug
   Only options are (as admin, normal user, other user),
   but those are from VS commands pro
 o Properties =+ Tab[Android Manifest]
   Exception:
   An error occurred trying to load the page.
   Not implemented (Exception from HRESULT: 0x80004001 (E_NOTIMPL))
 o Usually here there is hyperlink for adding AndroidManifes.xml
   file if one does not exists.
 * Visited older test project
 o Run/Debug button is enabled.
 o Deployment is possible and in Build Log in VS there is Deploying
   to device 100%
 o Nothing is deployed on device, app never starts.
 o In adb.log there were some errors (GPS related and some other,

Resolution-Workaround

 * Reinstalled latest version of Mono For Android
 * Run CCleaner registry clean
 * rebooted - did not try without it, maybe it could work


HTH

regards

mel

--
Miljenko Cvjetko dipl.ing. ET
Direktor/CEO
Projektant rjes(enja/Solution Architect 
Razvojni programer/Senior developer
Voditelj projekta/Project Manager

IX juz(na obala 13
Kajzerica Zagreb
T: 385 1 777
M: 385 91 557 447 3
F: 385 1 7779556
e:mcvje...@holisticware.net
w:http://www.holisticware.net

___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] WebView Javascript Interface and exposing methods through JNI

2012-01-09 Thread Tomasz Cielecki
Hi again,

I think I have narrowed it down to occur when trying to do this in a
Mono for Android Class Library project. If I put the code in a normal
project it compiles the Java code fine. Any reason to why it won't
work with a Class Library project?

On Mon, Jan 9, 2012 at 10:57 AM, Tomasz Cielecki  wrote:
> Ok, I have been messing around a bit with this JNI stuff and can't
> seem to get it to work. The C# code compiles fine, so it must be the
> Java code that fails somehow as I get two errors:
>
> "C:\Users\tcielecki\Desktop\MonoDroid.WAToolkit\MonoDroid.WAToolkit\MonoDroid.WAToolkit.Sample.csproj"
> (SignAndroidPackage target) (1) ->
> (_CompileJava target) ->
>  obj\Debug\android\src\monodroid\watoolkit\library\login\AccessControlWebAuthActivity_AccessControlJavascriptNotify.java(5,43):
> javac error :  cannot find symbol
> [C:\Users\tcielecki\Desktop\MonoDroid.WAToolkit\MonoDroid.WAToolkit\MonoDroid.WAToolkit.Sample.csproj]
> obj\Debug\android\src\monodroid\watoolkit\library\login\AccessControlWebAuthActivity_AccessControlJavascriptNotify.java(5,43):
> javac error : symbol  : class AccessControlJavascriptNotify
> [C:\Users\tcielecki\Desktop\MonoDroid.WAToolkit\MonoDroid.WAToolkit\MonoDroid.WAToolkit.Sample.csproj]
> obj\Debug\android\src\monodroid\watoolkit\library\login\AccessControlWebAuthActivity_AccessControlJavascriptNotify.java(5,43):
> javac error : location: package monodroid.watoolkit.library.login
> [C:\Users\tcielecki\Desktop\MonoDroid.WAToolkit\MonoDroid.WAToolkit\MonoDroid.WAToolkit.Sample.csproj]
> obj\Debug\android\src\monodroid\watoolkit\library\login\AccessControlWebAuthActivity_AccessControlJavascriptNotify.java(5,43):
> javac error :   extends
> monodroid.watoolkit.library.login.AccessControlJavascriptNotify
> [C:\Users\tcielecki\Desktop\MonoDroid.WAToolkit\MonoDroid.WAToolkit\MonoDroid.WAToolkit.Sample.csproj]
> obj\Debug\android\src\monodroid\watoolkit\library\login\AccessControlWebAuthActivity_AccessControlJavascriptNotify.java(5,43):
> javac error :  
> [C:\Users\tcielecki\Desktop\MonoDroid.WAToolkit\MonoDroid.WAToolkit\MonoDroid.WAToolkit.Sample.csproj]
>  obj\Debug\android\src\monodroid\watoolkit\library\login\AccessControlWebAuthActivity_AccessControlJavascriptNotify.java(15,2):
> error :  method does not override or implement a method from a
> supertype 
> [C:\Users\tcielecki\Desktop\MonoDroid.WAToolkit\MonoDroid.WAToolkit\MonoDroid.WAToolkit.Sample.csproj]
> obj\Debug\android\src\monodroid\watoolkit\library\login\AccessControlWebAuthActivity_AccessControlJavascriptNotify.java(15,2):
> error :         @Override
> [C:\Users\tcielecki\Desktop\MonoDroid.WAToolkit\MonoDroid.WAToolkit\MonoDroid.WAToolkit.Sample.csproj]
> obj\Debug\android\src\monodroid\watoolkit\library\login\AccessControlWebAuthActivity_AccessControlJavascriptNotify.java(15,2):
> error :  
> [C:\Users\tcielecki\Desktop\MonoDroid.WAToolkit\MonoDroid.WAToolkit\MonoDroid.WAToolkit.Sample.csproj]
>
> Seems to me that it cannot find the java file I created even though I
> have set the build action to AndroidJavaSource, can it have anything
> to do with that I am doing this in a Mono for Android Class Library?
>
> I have tried to follow the Adder/ManagedAdder samples very closely and
> came up with this code, and as I said it compiles just fine.
>
> AccessControlJavascriptNotify.java:
>
>        package monodroid.watoolkit.library.login;
>
>        public class AccessControlJavascriptNotify
>        {
>                public void notify(String securityTokenResponse) { }
>        }
>
> ManagedAccessControlJavascriptNotify.cs:
>
>        using System;
>        using Android.Runtime;
>
>        namespace MonoDroid.WAToolkit.Library.Login
>        {
>                
> [Register("monodroid/watoolkit/library/login/AccessControlJavascriptNotify",
> DoNotGenerateAcw = true)]
>                public abstract class ManagedAccessControlJavascriptNotify : 
> Java.Lang.Object
>                {
>                        static IntPtr class_ref =
> JNIEnv.FindClass("monodroid/watoolkit/library/login/AccessControlJavascriptNotify");
>
>                        public ManagedAccessControlJavascriptNotify ()
>                        {
>                        }
>
>                        public ManagedAccessControlJavascriptNotify(IntPtr 
> handle,
> JniHandleOwnership transfer)
>                        : base (handle, transfer)
>                        {
>                        }
>
>                        protected override Type ThresholdType
>                        {
>                                get { return 
> typeof(ManagedAccessControlJavascriptNotify); }
>                        }
>
>                        protected override IntPtr ThresholdClass
>                        {
>                                get { return class_ref; }
>                        }
>
>                        #region Notify
>                        static IntPtr id_notify;
>
>                        [Register("notify", "(Ljava/lang/String;)V", 
>

[mono-android] Implementing TabChangeListener

2012-01-09 Thread devbuzz
How can I implement IOnTabChangeListener?

I have a Tab where the setcontent references views not activities.

I have added the interface in the class declaration like this:

public class MainActivity2 : TabActivity,
Android.Widget.TabHost.IOnTabChangeListener

set the following:

TabHost.SetOnTabChangedListener(this);

and then attempted to override the OnTabChanged method like this:

protected override void OnTabChanged()
{

}

I get an error stating:

MainActivity2 does not implement interface member
'Android.Widget.TabHost.IOnTabChangeListener.OnTabChanged(string)'.
'MainActivity2.OnTabChanged(string)' cannot implement an interface member
because it is not public.

I am missing something? Any help would be much appreciated.

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Implementing-TabChangeListener-tp5131214p5131214.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] corruption on dates

2012-01-09 Thread devbuzz
Hi Jonathan,

Are you 100% sure this issue only affect the debugger displa?

I ask because if you read my post here:
http://mono-for-android.1047100.n5.nabble.com/quot-Invalid-format-string-quot-error-using-rs-GetValue-td5120916.html

You can see the image with the corrupt datetime values in my sqlite database
- it's seems uncannily similar?

Regards
Derek



--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/corruption-on-dates-tp5129159p5131220.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] Implementing TabChangeListener

2012-01-09 Thread Greg Shackles
Your method signature and protection level are wrong for OnTabChanged. It
should look like:


public void OnTabChanged(string tabId)
{
}

http://docs.mono-android.net/?link=M%3aAndroid.Widget.TabHost.IOnTabChangeListener.OnTabChanged(System.String)
___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] Implementing TabChangeListener

2012-01-09 Thread devbuzz
Thanks Greg!

For anyone else looking for this here are the pertinent steps:

1) implement the interface on your activity

public class MainActivity2 : TabActivity,
Android.Widget.TabHost.IOnTabChangeListener

2) important: set the OnTabChangeListener

TabHost.SetOnTabChangedListener(this);

3) implement the correct method signature as per Greg's info:

public void OnTabChanged(string tabID)
{
Toast.MakeText(this, tabID, ToastLength.Short).Show();
}

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Implementing-TabChangeListener-tp5131214p5131241.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] 01/09/2012 - Our Most Recent Tutorials

2012-01-09 Thread Monodroyd Blog
Good Days,

We would like to inform you about our most recent tutorials at
Monodroyd
:

*- Using Web Services to Build Your Own Weather Application*

Web services allow different applications from different sources to
communicate with each other without time-consuming custom coding. This post
explains how to import a third party web service and consume it in a Mono
for Android application.

Read more at:
http://monodroyd.wordpress.com/2012/01/09/using-web-services-to-build-your-own-weather-application-in-mono-for-android/

*
- Get Size, Orientation and Rotation of the Device Screen*

Android runs on a variety of smartphones and tablets that offer different
screen sizes. This post demonstrates how to find out the screen size,
orientation and rotation at runtime in Mono for Android applications.

Read more at:
http://monodroyd.wordpress.com/2012/01/07/get-screen-size-orientation-rotation-in-mono-for-android/


The entire list of our current tutorials can be found in our *Content
Index*page:
http://monodroyd.wordpress.com/content-index/


Please visit us often or follow us on Twitter at
@monodroydto see what new tutorials are
coming up next. We would also appreciate if
you can spread the word about us and our tutorials.

We wish you a wonderful new week, and thank you for reading Monodroyd.

- Monodroyd
___
Monodroid mailing list
Monodroid@lists.ximian.com

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


[mono-android] permissions in the AndroidManifest.xml file

2012-01-09 Thread Wally McClure

I was adding some permissions to an example.  I was looking at the 
AndroidManifest.xml file.  Specifically, there is a record_video permission 
that I am reading about.  I don't see that in the permissions listed in the 
VS.NET editor for permissions in the project properties.  Questions:
Does record_video permission actually exist?  How do I determine if it actually 
exists?Are the permissions listed in the AndroidManifest file in need of an 
update in any way?
Wally
  ___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] permissions in the AndroidManifest.xml file

2012-01-09 Thread Tomasz Cielecki
You can find a complete list of Android Permissions here:
http://developer.android.com/reference/android/Manifest.permission.html

I think you only need the Camera permission to be allowed to record video.

On Mon, Jan 9, 2012 at 3:28 PM, Wally McClure
 wrote:
> I was adding some permissions to an example.  I was looking at the
> AndroidManifest.xml file.  Specifically, there is a record_video permission
> that I am reading about.  I don't see that in the permissions listed in the
> VS.NET editor for permissions in the project properties.  Questions:
>
> Does record_video permission actually exist?  How do I determine if it
> actually exists?
> Are the permissions listed in the AndroidManifest file in need of an update
> in any way?
>
>
>
> Wally
>
>
> ___
> Monodroid mailing list
> Monodroid@lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
>



-- 
Med Venlig Hilsen / With Best Regards
Tomasz Cielecki
http://ostebaronen.dk
___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] Implementing TabChangeListener

2012-01-09 Thread John Murray
Dave 


I have an app which has Tabs and views 
I implemented a tabchanged method thus 

   this.TabHost.TabChanged += (IntentSender, e) =>
Tchanged(TabHost.CurrentTabView);

with 
  public void Tchanged(View currentview)
{
   
imm.HideSoftInputFromWindow(TabHost.ApplicationWindowToken, 0);

switch (this.TabHost.CurrentTab)
{ 
case 0://ops ta
if (opload == 0)
{
}

}
}
   //   Etc etc etc 


Works for me  but I'm not sure if it's what you're looking for
I'd also be appalled if anyone followed my example  - I'm pretty much a
newbie ;-)  

John Murray 


-Original Message-
From: monodroid-boun...@lists.ximian.com
[mailto:monodroid-boun...@lists.ximian.com] On Behalf Of devbuzz
Sent: 09 January 2012 12:25
To: monodroid@lists.ximian.com
Subject: [mono-android] Implementing TabChangeListener

How can I implement IOnTabChangeListener?

I have a Tab where the setcontent references views not activities.

I have added the interface in the class declaration like this:

public class MainActivity2 : TabActivity,
Android.Widget.TabHost.IOnTabChangeListener

set the following:

TabHost.SetOnTabChangedListener(this);

and then attempted to override the OnTabChanged method like this:

protected override void OnTabChanged()
{

}

I get an error stating:

MainActivity2 does not implement interface member
'Android.Widget.TabHost.IOnTabChangeListener.OnTabChanged(string)'.
'MainActivity2.OnTabChanged(string)' cannot implement an interface member
because it is not public.

I am missing something? Any help would be much appreciated.

--
View this message in context:
http://mono-for-android.1047100.n5.nabble.com/Implementing-TabChangeListener
-tp5131214p5131214.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] VisualStudio and AndroidManifest

2012-01-09 Thread Jonathan Pobst
Sounds like the install failed somehow.  Reinstalling like you did 
should be the fix.

Glad you got it working again, and thanks for sharing!

Jonathan

On 1/9/2012 4:41 AM, Miljenko Cvjetko wrote:
> Hi
>
> Got back after a while and have some problems with M4A in VS.
> Dunno if anybody had similar problems, but this might help someone...
>
> Symptoms
>
>   * Added new-clean MonoForAndroid project to existing VS solution
>   o Run/Debug button is disabled.
>   o Right click on project gives me no opportunity to run/debug
> Only options are (as admin, normal user, other user),
> but those are from VS commands pro
>   o Properties =+ Tab[Android Manifest]
> Exception:
> An error occurred trying to load the page.
> Not implemented (Exception from HRESULT: 0x80004001 (E_NOTIMPL))
>   o Usually here there is hyperlink for adding AndroidManifes.xml
> file if one does not exists.
>   * Visited older test project
>   o Run/Debug button is enabled.
>   o Deployment is possible and in Build Log in VS there is Deploying
> to device 100%
>   o Nothing is deployed on device, app never starts.
>   o In adb.log there were some errors (GPS related and some other,
>
> Resolution-Workaround
>
>   * Reinstalled latest version of Mono For Android
>   * Run CCleaner registry clean
>   * rebooted - did not try without it, maybe it could work
>
>
> HTH
>
> regards
>
> mel
>
> --
> Miljenko Cvjetko dipl.ing. ET
>   Direktor/CEO
>   Projektant rješenja/Solution Architect  
>   Razvojni programer/Senior developer
>   Voditelj projekta/Project Manager
>
> IX južna obala 13
> Kajzerica Zagreb
> T: 385 1 777
> M: 385 91 557 447 3
> F: 385 1 7779556
> e:mcvje...@holisticware.net
> w:http://www.holisticware.net
>
>
>
> ___
> 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] corruption on dates

2012-01-09 Thread Jonathan Pobst
Indeed, that does seem very similar.

I would try getting the values out and using Console.WriteLine or 
something to view the ToString of the dates, as well as checking the 
Month, Day, Year, etc, values to see if the values are correct.

Jonathan

On 1/9/2012 6:28 AM, devbuzz wrote:
> Hi Jonathan,
>
> Are you 100% sure this issue only affect the debugger displa?
>
> I ask because if you read my post here:
> http://mono-for-android.1047100.n5.nabble.com/quot-Invalid-format-string-quot-error-using-rs-GetValue-td5120916.html
>
> You can see the image with the corrupt datetime values in my sqlite database
> - it's seems uncannily similar?
>
> Regards
> Derek
>
>
>
> --
> View this message in context: 
> http://mono-for-android.1047100.n5.nabble.com/corruption-on-dates-tp5129159p5131220.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] VisualStudio and AndroidManifest

2012-01-09 Thread Miljenko Cvjetko
Hi Jonathan

On 2012.01.09 16:57, Jonathan Pobst wrote:
> Sounds like the install failed somehow.  Reinstalling like you did 
> should be the fix.
I'm suspecting on installation of Mango update for WP7. After Mono 
Mobile API
was announced I took few days to test it and add WP7 support for GeoLoc.

Due to the fact that devices are pretty expensive here I did not have WP 
device.
So in order to test GeoLocation with WP7 I had to install Mango, because 
emulator
that comes with it has Additional Tools (Accelerometer and Location 
simulation
plus Screenshot tool).

After that adding new (only new) projects was problematic...

>
> Glad you got it working again, and thanks for sharing!
No problems. Thank You guys.

mel
>
> Jonathan
>
> On 1/9/2012 4:41 AM, Miljenko Cvjetko wrote:
>> Hi
>>
>> Got back after a while and have some problems with M4A in VS.
>> Dunno if anybody had similar problems, but this might help someone...
>>
>> Symptoms
>>
>>   * Added new-clean MonoForAndroid project to existing VS solution
>>   o Run/Debug button is disabled.
>>   o Right click on project gives me no opportunity to run/debug
>> Only options are (as admin, normal user, other user),
>> but those are from VS commands pro
>>   o Properties =+ Tab[Android Manifest]
>> Exception:
>> An error occurred trying to load the page.
>> Not implemented (Exception from HRESULT: 0x80004001 (E_NOTIMPL))
>>   o Usually here there is hyperlink for adding AndroidManifes.xml
>> file if one does not exists.
>>   * Visited older test project
>>   o Run/Debug button is enabled.
>>   o Deployment is possible and in Build Log in VS there is Deploying
>> to device 100%
>>   o Nothing is deployed on device, app never starts.
>>   o In adb.log there were some errors (GPS related and some other,
>>
>> Resolution-Workaround
>>
>>   * Reinstalled latest version of Mono For Android
>>   * Run CCleaner registry clean
>>   * rebooted - did not try without it, maybe it could work
>>
>>
>> HTH
>>
>> regards
>>
>> mel
>>
>> -- 
>> Miljenko Cvjetko dipl.ing. ET
>> Direktor/CEO
>> Projektant rješenja/Solution Architect
>> Razvojni programer/Senior developer
>> Voditelj projekta/Project Manager
>>
>> IX južna obala 13
>> Kajzerica Zagreb
>> T: 385 1 777
>> M: 385 91 557 447 3
>> F: 385 1 7779556
>> e:mcvje...@holisticware.net
>> w:http://www.holisticware.net
>>
>>
>>
>> ___
>> Monodroid mailing list
>> Monodroid@lists.ximian.com
>>
>> UNSUBSCRIBE INFORMATION:
>> http://lists.ximian.com/mailman/listinfo/monodroid
>


-- 
Miljenko Cvjetko dipl.ing. ET
Direktor/CEO
Projektant rješenja/Solution Architect  
Razvojni programer/Senior developer
Voditelj projekta/Project Manager

IX južna obala 13
Kajzerica Zagreb
T: 385 1 777
M: 385 91 557 447 3
F: 385 1 7779556
e: mcvje...@holisticware.net
w: http://www.holisticware.net

___
Monodroid mailing list
Monodroid@lists.ximian.com

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


[mono-android] Parse error: There is a problem parsing the package.

2012-01-09 Thread Steve Sharrock
One of our clients just got a Samsung Galaxy Tab 10.1 (OS 3.1). When they
try to install our package (minimum version 2.2), they get the Parse error.
I made a one-time minimum/target version 3.1; but, they get the same error
occurs.
 
Any thoughts?
 
Steve Sharrock
Architecture/Design/Programming
www.sharkcode.com http://www.sharkcode.com/> 
 
___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] Parse error: There is a problem parsing the package.

2012-01-09 Thread Jonathan Pobst
Is it possible to get the full error from them?

Jonathan

On 1/9/2012 1:17 PM, Steve Sharrock wrote:
> One of our clients just got a Samsung Galaxy Tab 10.1 (OS 3.1). When
> they try to install our package (minimum version 2.2), they get the
> Parse error. I made a one-time minimum/target version 3.1; but, they get
> the same error occurs.
> Any thoughts?
> */Steve Sharrock/*
> Architecture/Design/Programming
> www.sharkcode.com http://www.sharkcode.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] My next big project for Android - advice please on if this can be done using Mono for Android

2012-01-09 Thread Paul F. Johnson
Hi,

Following the release of my Time Of Death app (which has had >1500
downloads and isn't even on the Market), my boss has given me free reign
over my next forensic science Android app.

I already have the basis of one as a winform app - it is a speed of
collision/skid length analysis application. For Android though I want to
extend it into the application the skid analysis one was supposed to be.
Problem is that I don't know if Mono for Android can handle what I want
to do.

What I'm looking to do is use the code I have for stopping distance,
grip efficiency and the likes but to tie that into a screen that allows
a model to be built (add roads, junctions, roundabouts, lighting,
corners - think Lego and you get the idea), draw in the skid marks and
final positions of the vehicles (again, these are from a choice). Based
on that, do the calcs. For the final positions and fine detail, the
software must be able to zoom into created image using a two finger
gesture.

I've not seen anything like this on Android (in or out of Mono for
Android) and have certainly not seen any form of drag and drop or
line/curve drawing examples anywhere.

Is what I'm trying to do going to work using Mono for Android for a
start?

Comments welcome

Paul
-- 
Vertraue mir, ich weiss, was ich mache...

___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] WebView Javascript Interface and exposing methods through JNI

2012-01-09 Thread Jonathan Pryor
On Jan 9, 2012, at 4:57 AM, Tomasz Cielecki wrote:
> Seems to me that it cannot find the java file I created even though I have 
> set the build action to AndroidJavaSource, can it have anything to do with 
> that I am doing this in a Mono for Android Class Library?

Is the AndroidJavaSource item in your main project or in the library project?

Your ManagedAccessControlJavascriptNotify.cs should be able to exist in the 
library project, but at this time the Java AccessControlJavascriptNotify.java 
file will need to be in your main project, as (just like Resources) our build 
system doesn't yet include files located in library projects.

Thanks,
 - Jon

___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] Multiplayer game using WCF WSDualHttpBinding

2012-01-09 Thread BlackCheetah
http://code.google.com/p/lidgren-network-gen3/ Lidgren.Networking networking
library 

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Multiplayer-game-using-WCF-WSDualHttpBinding-tp5130021p5131610.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] WebView Javascript Interface and exposing methods through JNI

2012-01-09 Thread Tomasz Cielecki
I tried first with having the java file in the library project, which
fails. So that is exactly as you describe that the build system does
not include files located in library projects when marked as
AndroidJavaSource.

Would it be enough just to copy it into the main project?

Thanks, I will try it out tomorrow. Hopefully it will work nicely
along with the Javascript Interface. If so I might release a nice
library helping with Windows Azure authentication for Mono for Android
soon :)

On Mon, Jan 9, 2012 at 11:31 PM, Jonathan Pryor  wrote:
> On Jan 9, 2012, at 4:57 AM, Tomasz Cielecki wrote:
>> Seems to me that it cannot find the java file I created even though I have 
>> set the build action to AndroidJavaSource, can it have anything to do with 
>> that I am doing this in a Mono for Android Class Library?
>
> Is the AndroidJavaSource item in your main project or in the library project?
>
> Your ManagedAccessControlJavascriptNotify.cs should be able to exist in the 
> library project, but at this time the Java AccessControlJavascriptNotify.java 
> file will need to be in your main project, as (just like Resources) our build 
> system doesn't yet include files located in library projects.
>
> Thanks,
>  - Jon
>
> ___
> Monodroid mailing list
> Monodroid@lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid



-- 
Med Venlig Hilsen / With Best Regards
Tomasz Cielecki
http://ostebaronen.dk
___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] My next big project for Android - advice please on if this can be done using Mono for Android

2012-01-09 Thread Tomasz Cielecki
Drawing lines on a canvas is possible along with drag and drop as you
are able to register listeners to Touch Events on Views and you can
easily override the Draw method on a View.

I have done a similar think with a View to create my own graphs which
I draw manually with lines and paths. Though without zoom or anything,
but that could be implemented by listening to events and react to
those.

I think your biggest challenge is going to be to find out how to model
all the roads, junctions and so on and how to tie them together (maybe
you already have thought of this?)

I think as a whole the Mono for Android platform is ready for what you
are trying to achieve. Can't see why it shouldn't be.

On Mon, Jan 9, 2012 at 11:09 PM, Paul F. Johnson
 wrote:
> Hi,
>
> Following the release of my Time Of Death app (which has had >1500
> downloads and isn't even on the Market), my boss has given me free reign
> over my next forensic science Android app.
>
> I already have the basis of one as a winform app - it is a speed of
> collision/skid length analysis application. For Android though I want to
> extend it into the application the skid analysis one was supposed to be.
> Problem is that I don't know if Mono for Android can handle what I want
> to do.
>
> What I'm looking to do is use the code I have for stopping distance,
> grip efficiency and the likes but to tie that into a screen that allows
> a model to be built (add roads, junctions, roundabouts, lighting,
> corners - think Lego and you get the idea), draw in the skid marks and
> final positions of the vehicles (again, these are from a choice). Based
> on that, do the calcs. For the final positions and fine detail, the
> software must be able to zoom into created image using a two finger
> gesture.
>
> I've not seen anything like this on Android (in or out of Mono for
> Android) and have certainly not seen any form of drag and drop or
> line/curve drawing examples anywhere.
>
> Is what I'm trying to do going to work using Mono for Android for a
> start?
>
> Comments welcome
>
> Paul
> --
> Vertraue mir, ich weiss, was ich mache...
>
> ___
> Monodroid mailing list
> Monodroid@lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid



-- 
Med Venlig Hilsen / With Best Regards
Tomasz Cielecki
http://ostebaronen.dk
___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] My next big project for Android - advice please on if this can be done using Mono for Android

2012-01-09 Thread Paul F. Johnson
Hi,

> I think your biggest challenge is going to be to find out how to model
> all the roads, junctions and so on and how to tie them together (maybe
> you already have thought of this?)

My biggest challenge is going to be the listeners more than anything ;)

> I think as a whole the Mono for Android platform is ready for what you
> are trying to achieve. Can't see why it shouldn't be.

That's what I like to hear :)

Thanks for your swift reply

Paul

-- 
Vertraue mir, ich weiss, was ich mache...

___
Monodroid mailing list
Monodroid@lists.ximian.com

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


[mono-android] Robotium

2012-01-09 Thread Robert Ferguson
Hi,

Has anyone had success using Robotium (
http://code.google.com/p/robotium/ ) or any other integration testing
with Monodroid?  I saw this note:
http://code.google.com/p/robotium/issues/detail?id=175 and not too
much else out there.  I'm really trying to identify any method for
automatic testing in Monodroid besides writing basic unit tests.

Best Regards,
Rob
___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] Robotium

2012-01-09 Thread Tom Opgenorth
Good question.  I'd like to know what you find out.  I've dabbled with
Robotium, but haven't tried on on M4A at all.

On Mon, Jan 9, 2012 at 16:56, Robert Ferguson  wrote:
> Hi,
>
> Has anyone had success using Robotium (
> http://code.google.com/p/robotium/ ) or any other integration testing
> with Monodroid?  I saw this note:
> http://code.google.com/p/robotium/issues/detail?id=175 and not too
> much else out there.  I'm really trying to identify any method for
> automatic testing in Monodroid besides writing basic unit tests.
>
> Best Regards,
> Rob
> ___
> Monodroid mailing list
> Monodroid@lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid



-- 
http://www.opgenorth.net
___
Monodroid mailing list
Monodroid@lists.ximian.com

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


[mono-android] adding a contact

2012-01-09 Thread Wally McClure

I'm trying to add a new contact based on adding a record: 
http://developer.android.com/guide/topics/providers/content-providers.html

My code is:
   ContentValues values = new ContentValues();
// Add Abraham Lincoln to contacts and make him a favorite.
 
values.Put(Android.Provider.Contacts.PeopleColumns.Name, "Abraham 
Lincoln");
// 1 = the new contact is added to favorites
// 0 = the new contact is not added to favorites
values.Put(Android.Provider.Contacts.PeopleColumns.Starred, 1);
 
var uri = cr.Insert(ContactsContract.Contacts.ContentUri, values);
Unfortunately, I'm getting the following error on the insert:
Unhandled Exception:

Java.Lang.UnsupportedOperationException: Aggregate contacts are created 
automatically

Any help on resolving this exception is appreciated.

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

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


Re: [mono-android] adding a contact

2012-01-09 Thread Jonathan Pryor
On Jan 9, 2012, at 8:50 PM, Wally McClure wrote:
> I'm trying to add a new contact based on adding a record: 
> http://developer.android.com/guide/topics/providers/content-providers.html
...
> Java.Lang.UnsupportedOperationException: Aggregate contacts are created 
> automatically

Googling for that exception suggests the following solutions:


http://stackoverflow.com/questions/4075694/inserting-contacts-in-android-2-2

http://stackoverflow.com/questions/3226996/writing-contact-to-contact-database-android-2-1

 - Jon

___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] WebView Javascript Interface and exposing methods through JNI

2012-01-09 Thread Jonathan Pryor
On Jan 9, 2012, at 6:42 PM, Tomasz Cielecki wrote:
> Would it be enough just to copy it into the main project?

Yes, or Link the file into your main project. The key point is that if you want 
it in the .apk and it's not C# code, it needs to be in the main project. This 
includes resources, Java source, Java libraries, assets...

 - Jon

___
Monodroid mailing list
Monodroid@lists.ximian.com

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