Re: [mono-android] MonoDroid Professional Licence

2011-12-09 Thread Miljenko Cvjetko
Hi

back to this question (again)

On 2011.09.21 19:08, Jonathan Pryor wrote:
> On Sep 21, 2011, at 5:39 AM, Miljenko Cvjetko wrote:
>> Is it legal to install/activate Professional version both on
>>  • Windows (VS and MonoDevelop) and
>>  • Mac?
> As long as you register it on<= 3 machines, you're fine. I have the same 
> registration present on both OS X and a Windows VM.
It seems that VS and MD on the same laptop (machine) are two different 
machines.
During tests of MobileAPI loading to device form VS threw exceptions and 
app does
not launch (we are collecting logs), **but** from MD everything is fine 
(we get
Location data).
results will be in new thread...

To stay on topic: I had to activate monodevelop plugin on the same box 
where I have
VS activated Mono4Android licence?!?

regards

mel
>   - Jon
>


-- 
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


Re: [mono-android] cant make package when referencing a .JAR lib.

2011-12-09 Thread Piotr Kryger
Thanks, setting build action to AndroidJavaLibrary fixed my problem.

2011/12/7 Jonathan Pobst 

> Try changing your .jar file's build action to AndroidJavaLibrary.
>
> Adding the new action was supposed to be backwards compatible,
> AndroidJavaSource is supposed to work for either .java or .jar, but maybe
> it got busted.
>
> If that doesn't help, you can look at the command line VS or MD is using
> to call javac and see if something is missing from it.
>
> Jonathan
>
>
>
> On 12/7/2011 6:36 AM, Piotr Kryger wrote:
>
>> I have similar problem.
>> I use acra-4.2.3.jar and java class which imports some stuff from this
>> jar.
>> Build action for jar as well as for java class are AndroidJavaSource.
>>
>> When I try to deploy I see following lines:
>>
>>(SignAndroidPackage target) (1) ->
>>(_CompileJava target) ->  MyJavaClass.java(4,1): javac error :
>>package org.acra does not exist [XXX.csproj]
>>
>>
>> and more javac errors saying "package does not exist" or "cannot find
>> symbol".
>>
>> Same project deploys fine if jar file and java class are excluded.
>> Issue was not present prior to m4a 4.0 (I was using 1.2).
>> I use VisualStudio 2010 and JDK 1.6.
>>
>> 2011/12/6 warren burch > **>
>>
>>
>>This worked with the previous version of mono for android.
>>I use Google admobs JAR file, have a helper .JAVA class and a managed
>>caller.
>>Package complains that classes references that are within the JAR
>>file are
>>not available.
>>
>>How can I make this work now?
>>
>>Cheers
>>Warren
>>
>>--
>>View this message in context:
>>http://mono-for-android.**1047100.n5.nabble.com/cant-**
>> make-package-when-referencing-**a-JAR-lib-tp5051417p5051417.**html
>>Sent from the Mono for Android mailing list archive at Nabble.com.
>>__**_
>>Monodroid mailing list
>>Monodroid@lists.ximian.com 
>> > >
>>
>>
>>UNSUBSCRIBE INFORMATION:
>>
>> http://lists.ximian.com/**mailman/listinfo/monodroid
>>
>>
>>
>>
>> __**_
>> Monodroid mailing list
>> Monodroid@lists.ximian.com
>>
>> UNSUBSCRIBE INFORMATION:
>> http://lists.ximian.com/**mailman/listinfo/monodroid
>>
>
>
___
Monodroid mailing list
Monodroid@lists.ximian.com

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


[mono-android] Error with MonoDroid 4

2011-12-09 Thread milop
This code was working in v1.2, but I get "System.NotSupportedException: Don't
know how to convert type TicketLine to an Android.Runtime.IJavaObject" in
4.0:

My class:
class TicketLine
{
public int TicketNo {get; set;}
public int LineNo { get; set; }
public string ItemNo { get; set; }
public int Quantity { get; set; }
public string Description { get; set; }
public string UserDescription { get; set; }
public string MAC { get; set; }
public string SerialNumber { get; set; }
public string DeviceType { get; set; }

public override string ToString()
{
if (string.IsNullOrEmpty(SerialNumber) &&
string.IsNullOrEmpty(MAC))
return "(Qty) " + Quantity.ToString() + " - " + ItemNo + " -
" + Description;
else
return "Registered: (Qty) " + Quantity.ToString() + " - " +
ItemNo + " - " + UserDescription;
}
}
}

This code fails in 4.0:
ArrayAdapter adapter = new
ArrayAdapter(this, Android.Resource.Layout.SimpleListItem1,
listViewArray);

where listViewArray is:

listViewArray = new TicketLine[i];

Please advise.

Thank,
Mike

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Error-with-MonoDroid-4-tp5061997p5061997.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] calling a web reference async

2011-12-09 Thread Wally McClure

Is anyone else able to call a web reference async?  I am getting the following 
result in the simulator and the device.  When I call the exact same web 
reference sync with the same parameters, I don't get an error.  

Also, if I create a proxy manually using the silverlight sdk, I can call the 
web service through the proxy sync and all is ok.  If this were just for some 
random program, I would move on, but this is for our book and this is in a 
section where I show options regarding web services.  I'd like to keep it if 
possible.  

My questions:
1.  Is this a bug? (quite possible that I am doing something stupid).  I'm glad 
to provide my project if that will help.
2.  If this is a bug, is there more data that I can provide to help fix it?

Wally

output from ddms:

12-09 10:03:45.732: D/dalvikvm(134): GC_EXPLICIT freed 4K, 49% free 
3095K/5959K, external 6522K/8145K, paused 769ms
12-09 10:03:48.312: I/MonoDroid(464): UNHANDLED EXCEPTION: 
System.Reflection.TargetInvocationException: Exception has been thrown by the 
target of an invocation. ---> System.IndexOutOfRangeException: Array index is 
out of range.
12-09 10:03:48.312: I/MonoDroid(464):   at (wrapper stelemref) 
object:virt_stelemref_object (intptr,object)
12-09 10:03:48.312: I/MonoDroid(464):   at 
System.Xml.Serialization.XmlTypeMapMember.SetValueSpecified (System.Object ob, 
Boolean value) [0x0] in :0 
12-09 10:03:48.312: I/MonoDroid(464):   at 
System.Xml.Serialization.XmlSerializationReaderInterpreter.SetMemberValue 
(System.Xml.Serialization.XmlTypeMapMember member, System.Object ob, 
System.Object value, Boolean isValueList) [0x0] in :0 
12-09 10:03:48.312: I/MonoDroid(464):   at 
System.Xml.Serialization.XmlSerializationReaderInterpreter.SetMemberValueFromAttr
 (System.Xml.Serialization.XmlTypeMapMember member, System.Object ob, 
System.Object value, Boolean isValueList) [0x0] in :0 
12-09 10:03:48.312: I/MonoDroid(464):   at 
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadMessage 
(System.Xml.Serialization.XmlMembersMapping typeMap) [0x0] in :0 
12-09 10:03:48.312: I/MonoDroid(464):   at 
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadRoot () 
[0x0] in :0 
12-09 10:03:48.312: I/MonoDroid(464):   at 
System.Xml.Serialization.XmlSerializer.Deserialize 
(System.Xml.Serialization.XmlSerializationReader reader) [0x0] in :0 
12-09 10:03:48.312: I/MonoDroid(464):   --- End of inner exception stack trace 
---
12-09 10:03:48.312: I/MonoDroid(464): at 
System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary () 
<0x00054>
12-09 10:03:48.312: I/MonoDroid(464): at 
InternalNetworkData.com.twtmstr.www.LoginCompletedEventArgs.get_LoginResult () 
<0x00013>
12-09 10:03:48.312: I/MonoDroid(464): at 
InternalNetworkData.Activity1/<>c__DisplayClass1.b__0 () 
<0x0002b>
12-09 10:03:48.312: I/MonoDroid(464): at 
Java.Lang.Thread/RunnableImplementor.Run () <0x0003f>
12-09 10:03:48.312: I/MonoDroid(464): at Java.Lang.IRunnableInvoker.n_Run 
(intptr,intptr) <0x0003b>
12-09 10:03:48.312: I/MonoDroid(464): at (wrapper dynamic-method) 
object.2b364c4f-d426-43bb-ab4f-cc23eb7ef2ad (intptr,intptr) <0x0002b>
12-09 10:03:48.342: E/mono(464): Unhandled Exception: 
System.Reflection.TargetInvocationException: Exception has been thrown by the 
target of an invocation. ---> System.IndexOutOfRangeException: Array index is 
out of range.
12-09 10:03:48.342: E/mono(464):   at (wrapper stelemref) 
object:virt_stelemref_object (intptr,object)
12-09 10:03:48.342: E/mono(464):   at 
System.Xml.Serialization.XmlTypeMapMember.SetValueSpecified (System.Object ob, 
Boolean value) [0x0] in :0 
12-09 10:03:48.342: E/mono(464):   at 
System.Xml.Serialization.XmlSerializationReaderInterpreter.SetMemberValue 
(System.Xml.Serialization.XmlTypeMapMember member, System.Object ob, 
System.Object value, Boolean isValueList) [0x0] in :0 
12-09 10:03:48.342: E/mono(464):   at 
System.Xml.Serialization.XmlSerializationReaderInterpreter.SetMemberValueFromAttr
 (System.Xml.Serialization.XmlTypeMapMember member, System.Object ob, 
System.Object value, Boolean isValueList) [0x0] in :0 
12-09 10:03:48.342: E/mono(464):   at 
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadMessage 
(System.Xml.Serialization.XmlMembersMapping typeMap) [0x0] in :0 
12-09 10:03:48.342: E/mono(464):   at 
12-09 10:03:48.362: D/Zygote(33): Process 464 exited cleanly (1)
12-09 10:03:48.388: I/WindowManager(62): WIN DEATH: Window{40846018 
InternalNetworkData.InternalNetworkData/internalnetworkdata.Activity1 
paused=false}
12-09 10:03:48.402: I/ActivityManager(62): Process 
InternalNetworkData.InternalNetworkData (pid 464) has died.
12-09 10:03:48.462: W/InputManagerService(62): Got RemoteException sending 
setActive(false) notification to pid 464 uid 10058
12-09 10:04:05.112: D/SntpClient(62): request time failed: 
java.net.SocketException: Address family not supported by protocol

   

[mono-android] Incorporating latest AdMob library (4.3.1)

2011-12-09 Thread mkowalski
I had noticed that there was an updated release of the AdMob library and was
trying to incoporate that into my app but I am confused as to how to do
this.

The guide itself
(http://code.google.com/mobile/ads/docs/android/fundamentals.html) mentions
that it works on 1.5 or later, but that I should compile against 3.2 (API
v13) or later. Currently, my minSdkVersion is 8, but I do have my
targetSdkVersion set to 13 but the flags 'screenSize' and
'smallestScreenSize' don't work when I try to add those to my AdActivity in
my manifest.

This is probably something simple that I am missing, but how would I go
about compiling against 3.2 or greater yet still allow for it to run on 2.2
or greater?

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Incorporating-latest-AdMob-library-4-3-1-tp5062302p5062302.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] App Crashes on Samssung Galaxy SGH-1897 - Uncatchable Exception thrown by mono

2011-12-09 Thread klimaye
The app is on the store and crashes as soon as it is started. This does not
happen on a host of other devices.

We tested on Samsung Galaxy S2 and this did not happen. This happens on the
Samsung Galaxy S1 phone.

Device Spec :
Phone :  Samsung Galaxy SGH - 1897
Kernel : 2.6.9
Firmware : 2.1

Please advice, we would like our customers to get an update ASAP if
possible.

If there is a newer build I can try, please let me know.

Thanks


Log :

I/monodroid-gc(31885): environment does not support jni NewWeakGlobalRef
E/mono(31885): 
E/mono(31885): Unhandled Exception: System.NullReferenceException:
Object reference not set to an instance of an object
E/mono(31885):   at System.Reflection.Emit.DynamicMethod..ctor
(System.String name, MethodAttributes attributes, CallingConventions
callingConvention, System.Type returnType, System.Type[] parameterTypes,
System.Type owner, Boolean skipVisibility) [0x0] in :0 
E/mono(31885):   at System.Reflection.Emit.DynamicMethod..ctor
(System.String name, System.Type returnType, System.Type[] parameterTypes,
System.Type owner, Boolean skipVisibility) [0x0] in :0 
I/ActivityManager( 2244): Starting activity: Intent {
act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER]
flg=0x1020 cmp=Test.PocketRx/pocketrxmono.AppStartActivity }
I/ActivityManager( 2244): Start proc Test.PocketRx for activity
Test.PocketRx/pocketrxmono.AppStartActivity: pid=31990 uid=10134 gids={3003,
1006}
I/ActivityThread(31990): Publishing provider Test.PocketRx.__mono_init__:
mono.MonoRuntimeProvider
D/dalvikvm(31990): Trying to load lib
/data/data/TEST.PocketRx/lib/libmonodroid.so 0x47a6da30
D/dalvikvm(31990): Added shared lib
/data/data/TEST.PocketRx/lib/libmonodroid.so 0x47a6da30
I/monodroid-gc(31990): environment does not support jni NewWeakGlobalRef
W/(31990): invalid code stream, instruction before IMT value is not
a LDC in mono_arch_find_imt_method() (code 0x4ba05fd4 value 0: 0xe58d0008
-1: 0xe591f064 -2: 0xe1a0e00f)
F/(31990): * Assertion at ../../../../mono/mini/mini-arm.c:5559,
condition `IS_LDR_PC (code_ptr [0])' not met
I/mono(31990): Stacktrace:
I/mono(31990): 
I/mono(31990):   at
System.Collections.CaseInsensitiveHashCodeProvider.AreEqual
(System.Globalization.CultureInfo,System.Globalization.CultureInfo)
<0x00023>
I/mono(31990):   at
System.Collections.CaseInsensitiveHashCodeProvider..cctor () <0x00027>
I/mono(31990):   at (wrapper runtime-invoke) object.runtime_invoke_void
(object,intptr,intptr,intptr) <0x>
I/mono(31990):   at System.Security.Cryptography.CryptoConfig.Initialize
() <0x0001b>
I/mono(31990):   at
System.Security.Cryptography.CryptoConfig.CreateFromName (string,object[])
<0x0006f>
I/mono(31990):   at
System.Security.Cryptography.CryptoConfig.CreateFromName (string) <0x00017>
I/mono(31990):   at
System.Security.Cryptography.RandomNumberGenerator.Create (string) <0x00013>
I/mono(31990):   at
System.Security.Cryptography.RandomNumberGenerator.Create () <0xf>
I/mono(31990):   at System.Guid.NewGuid () <0x0008f>
I/mono(31990):   at Android.Runtime.JNINativeWrapper.CreateDelegate
(System.Delegate,System.Reflection.MethodInfo,System.Reflection.MethodInfo)
<0x00187>
I/mono(31990):   at Android.Runtime.JNINativeWrapper.CreateDelegate
(System.Delegate) <0x0001b>
I/mono(31990):   at Android.App.Application.GetOnCreateHandler ()
<0x00067>
I/mono(31990):   at Android.Runtime.JNIEnv.RegisterJniNatives
(intptr,int,intptr,intptr,int) <0x0055b>
I/mono(31990):   at (wrapper runtime-invoke)
.runtime_invoke_void_intptr_int_intptr_intptr_int
(object,intptr,intptr,intptr) <0x>
W/ActivityManager( 2244): Activity pause timeout for HistoryRecord{48316e68
Test.PocketRx/pocketrxmono.AppStartActivity}
W/ActivityManager( 2244): Activity idle timeout for HistoryRecord{48316e68
Test.PocketRx/pocketrxmono.AppStartActivity}

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/App-Crashes-on-Samssung-Galaxy-SGH-1897-Uncatchable-Exception-thrown-by-mono-tp5062375p5062375.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] App Crashes on Samssung Galaxy SGH-1897 - Uncatchable Exception thrown by mono

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

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


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

Mike Child



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

Re: [mono-android] App Crashes on Samssung Galaxy SGH-1897 - Uncatchable Exception thrown by mono

2011-12-09 Thread klimaye
Mike,

Thanks for the response. That helps.

Now if mono team can corroborate that.

Appreciate it.

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/App-Crashes-on-Samssung-Galaxy-SGH-1897-Uncatchable-Exception-thrown-by-mono-tp5062375p5062456.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] How to use OnProgressChanged in m4a?

2011-12-09 Thread Hernani Delindro
Hello, I'm still new to Mono for Android, and C# in general, but I would like
some help on how to "translate" the following code to m4a, because I'm
having trouble understanding with how listeners and callbacks are
implemented in m4a.

webview.SetWebChromeClient(new WebChromeClient() {
public void OnProgressChanged(WebView view, int progress)
{
activity.SetTitle("Loading...");
activity.SetProgress(progress * 100);
 
if(progress == 100)
activity.SetTitle(Resource.String.app_name);
}
});

Best Regards,
Hernani Delindro

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/How-to-use-OnProgressChanged-in-m4a-tp5062534p5062534.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] App Crashes on Samssung Galaxy SGH-1897 - Uncatchable Exception thrown by mono

2011-12-09 Thread Alex Soto
http://android.xamarin.com/Releases/Mono_for_Android_4/Release_4.0.0

Check that page, the info you are looking for is on the bottom of it

Alex

El 09/12/2011, a las 11:24 a.m., klimaye  escribió:

> Mike,
>
> Thanks for the response. That helps.
>
> Now if mono team can corroborate that.
>
> Appreciate it.
>
> --
> View this message in context: 
> http://mono-for-android.1047100.n5.nabble.com/App-Crashes-on-Samssung-Galaxy-SGH-1897-Uncatchable-Exception-thrown-by-mono-tp5062375p5062456.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] How to use OnProgressChanged in m4a?

2011-12-09 Thread Jonathan Pryor
On Dec 9, 2011, at 12:52 PM, Hernani Delindro wrote:
> Hello, I'm still new to Mono for Android, and C# in general, but I would like
> some help on how to "translate" the following code to m4a, because I'm
> having trouble understanding with how listeners and callbacks are
> implemented in m4a.
> 
> webview.SetWebChromeClient(new WebChromeClient() {
>public void OnProgressChanged(WebView view, int progress)
>{
>activity.SetTitle("Loading...");
>activity.SetProgress(progress * 100);
> 
>if(progress == 100)
>activity.SetTitle(Resource.String.app_name);
>}
> });

That is an anonymous inner class, which C# doesn't support. Instead, you need 
to turn it into a "normal" class (either at top-level or a nested type, doesn't 
really matter):

class WebChromeClientDelegator : WebChromeClient {
public Action ProgressChanged;

public override void OnProgressChanged (WebView view, int 
newProgress)
{
if (ProgressChanged != null)
ProgressChanged (view, newProgress);
}
}

// ...
webview.SetWebChromeClient (new WebChromeClientDelegator () {
ProgressChanged = (view, progress) => {
activity.SetTitle ("Loading...");
activity.SetProgress (progress * 100);
if (progress == 100)
activity.SetTitle 
(Resource.String.app_name);
},
});

 - Jon

___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] Incorporating latest AdMob library (4.3.1)

2011-12-09 Thread Jonathan Pryor
On Dec 9, 2011, at 11:37 AM, mkowalski wrote:
> The guide itself 
> (http://code.google.com/mobile/ads/docs/android/fundamentals.html) mentions 
> that it works on 1.5 or later, but that I should compile against 3.2 (APIv13) 
> or later.

Oof. As a Java developer, this means that if you inadvertently use a type that 
doesn't exist in API level 3, the compiler won't warn you. And if you change 
your project settings to use the API level 3 android.jar, you'll no longer 
build because of AndroidManifest.xml errors.

> Currently, my minSdkVersion is 8, but I do have my targetSdkVersion set to 13 
> but the flags 'screenSize' and 'smallestScreenSize' don't work when I try to 
> add those to my AdActivity in my manifest.

This fails because we aren't providing assemblies for API level 13 (Android 
v3.2). Try setting your TargetFrameworkVersion to Android v4.0 (API level 14), 
that should allow it to build.

> This is probably something simple that I am missing, but how would I go about 
> compiling against 3.2 or greater yet still allow for it to run on 2.2 or 
> greater?

Either "very carefully" or "you don't."

The "very carefully" answer is as above: set your TargetFrameworkVersion to 
Android v4.0, which should allow the android:configChanges attribute to work.

However, this is potentially fraught with peril [0], as some Android types and 
members have "moved" in a backward compatible, but not forward compatible, 
manner. You will need to test your code to ensure that it actually works on 
your target platforms.

 - Jon

[0] http://lists.ximian.com/pipermail/monodroid/2011-November/007350.html

___
Monodroid mailing list
Monodroid@lists.ximian.com

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


[mono-android] webservices not working in release mode

2011-12-09 Thread Emiel Metselaar
I am preparing our app for release. The app talks against several
sharepoint webservices. And it was behaving perfectly in debug mode, when I
switched it to release mode it stopped working.

To potentially spare other people the same frustrations I experienced.

I want to share a small checklist
1) on the build tab check "Generate serialization assembly" is set to off (
http://stackoverflow.com/questions/5792193/error-building-a-release-version-when-referencing-a-web-service
)
2) do you have the INTERNET permission (from this list
http://mono-for-android.1047100.n5.nabble.com/WebServices-not-working-in-Release-Mode-Signed-apk-td4362833.html
)
3) on the mono for android tab the linking setting if you have followed
http://docs.xamarin.com/android/tutorials/Preparing_Package_for_Android_Marketplace,
you probably have the setting linking set to "sdk and user assemblies" like
i did. In my case that was not such a great idea, my webservice did not
return to much results anymore. Try to set the linking to "sdk assemblies
only". Perhaps the screenshot from the Xamarin site should be changed,
after reading up it looks like linking also user assemblies seems more
risky.

Looking back it looks like a small list but it kept me busy 6 hours ;), so
i hope it will help somebody else...
___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] How to use OnProgressChanged in m4a?

2011-12-09 Thread Hernani Delindro
Thanks for the help. That works :)

On Fri, Dec 9, 2011 at 7:24 PM, Jonathan Pryor-2 [via Mono for Android] <
ml-node+s1047100n506278...@n5.nabble.com> wrote:

> On Dec 9, 2011, at 12:52 PM, Hernani Delindro wrote:
>
> > Hello, I'm still new to Mono for Android, and C# in general, but I would
> like
> > some help on how to "translate" the following code to m4a, because I'm
> > having trouble understanding with how listeners and callbacks are
> > implemented in m4a.
> >
> > webview.SetWebChromeClient(new WebChromeClient() {
> >public void OnProgressChanged(WebView view, int progress)
> >{
> >activity.SetTitle("Loading...");
> >activity.SetProgress(progress * 100);
> >
> >if(progress == 100)
> >activity.SetTitle(Resource.String.app_name);
> >}
> > });
>
> That is an anonymous inner class, which C# doesn't support. Instead, you
> need to turn it into a "normal" class (either at top-level or a nested
> type, doesn't really matter):
>
> class WebChromeClientDelegator : WebChromeClient {
> public Action ProgressChanged;
>
> public override void OnProgressChanged (WebView view, int
> newProgress)
> {
> if (ProgressChanged != null)
> ProgressChanged (view, newProgress);
> }
> }
>
> // ...
> webview.SetWebChromeClient (new WebChromeClientDelegator () {
> ProgressChanged = (view, progress) => {
> activity.SetTitle ("Loading...");
> activity.SetProgress (progress * 100);
> if (progress == 100)
> activity.SetTitle
> (Resource.String.app_name);
> },
> });
>
>  - Jon
>
> ___
> Monodroid mailing list
> [hidden email] 
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://mono-for-android.1047100.n5.nabble.com/How-to-use-OnProgressChanged-in-m4a-tp5062534p5062788.html
>  To unsubscribe from How to use OnProgressChanged in m4a?, click 
> here
> .
> NAML
>


--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/How-to-use-OnProgressChanged-in-m4a-tp5062534p5063005.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] How to reference and use a android library project apk

2011-12-09 Thread klimaye
I am looking at

http://code.google.com/p/android-section-list/

as a sectioned listview implementation.

How would one reference the generated apk (output of library project) with
monodroid?

Would I use JNI ?

Please advice. Any reference material would be helpful.

Thanks

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/How-to-reference-and-use-a-android-library-project-apk-tp5063177p5063177.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] Incorporating latest AdMob library (4.3.1)

2011-12-09 Thread mkowalski
OK - that makes sense. I think I've seen this kind of issue come up a couple
times in the mailing list i.e. the compiling against one version but running
against another version. Based on what I've seen, there isn't really a
conclusive list as to what to avoid so I'll assume it's mostly trial and
error if I truly want to attempt it.

Thanks for your reply!

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Incorporating-latest-AdMob-library-4-3-1-tp5062302p5063345.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] webservices not working in release mode

2011-12-09 Thread Wally McClure

Thanks for the suggestions.  Unfortunately, no luck on trying these here.  
Results inline.  Any other suggestions are welcome.

Wally

Date: Fri, 9 Dec 2011 21:39:23 +0100
From: edmetsel...@gmail.com
To: monodroid@lists.ximian.com
Subject: [mono-android] webservices not working in release mode

I am preparing our app for release. The app talks against several sharepoint 
webservices. And it was behaving perfectly in debug mode, when I switched it to 
release mode it stopped working. 
To potentially spare other people the same frustrations I experienced. 

I want to share a small checklist1) on the build tab check "Generate 
serialization assembly" is set to off 
(http://stackoverflow.com/questions/5792193/error-building-a-release-version-when-referencing-a-web-service)

- tried this, but all I got was a compile time error.


2) do you have the INTERNET permission (from this list 
http://mono-for-android.1047100.n5.nabble.com/WebServices-not-working-in-Release-Mode-Signed-apk-td4362833.html)

- Had this, so I was good here.


3) on the mono for android tab the linking setting if you have followed 
http://docs.xamarin.com/android/tutorials/Preparing_Package_for_Android_Marketplace,
 you probably have the setting linking set to "sdk and user assemblies" like i 
did. In my case that was not such a great idea, my webservice did not return to 
much results anymore. Try to set the linking to "sdk assemblies only". Perhaps 
the screenshot from the Xamarin site should be changed, after reading up it 
looks like linking also user assemblies seems more risky.

- Nothing different on this.  Tried all three possible values.


Looking back it looks like a small list but it kept me busy 6 hours ;), so i 
hope it will help somebody else...

___
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] webservices not working in release mode

2011-12-09 Thread Wally McClure

Not quite sure what the issue is/was, but I changed my example to call a 
different web service and everything worked properly.

Wally

From: theevilprogram...@hotmail.com
To: monodroid@lists.ximian.com
Date: Fri, 9 Dec 2011 21:27:16 -0500
Subject: Re: [mono-android] webservices not working in release mode








Thanks for the suggestions.  Unfortunately, no luck on trying these here.  
Results inline.  Any other suggestions are welcome.

Wally

Date: Fri, 9 Dec 2011 21:39:23 +0100
From: edmetsel...@gmail.com
To: monodroid@lists.ximian.com
Subject: [mono-android] webservices not working in release mode

I am preparing our app for release. The app talks against several sharepoint 
webservices. And it was behaving perfectly in debug mode, when I switched it to 
release mode it stopped working. 
To potentially spare other people the same frustrations I experienced. 

I want to share a small checklist1) on the build tab check "Generate 
serialization assembly" is set to off 
(http://stackoverflow.com/questions/5792193/error-building-a-release-version-when-referencing-a-web-service)

- tried this, but all I got was a compile time error.


2) do you have the INTERNET permission (from this list 
http://mono-for-android.1047100.n5.nabble.com/WebServices-not-working-in-Release-Mode-Signed-apk-td4362833.html)

- Had this, so I was good here.


3) on the mono for android tab the linking setting if you have followed 
http://docs.xamarin.com/android/tutorials/Preparing_Package_for_Android_Marketplace,
 you probably have the setting linking set to "sdk and user assemblies" like i 
did. In my case that was not such a great idea, my webservice did not return to 
much results anymore. Try to set the linking to "sdk assemblies only". Perhaps 
the screenshot from the Xamarin site should be changed, after reading up it 
looks like linking also user assemblies seems more risky.

- Nothing different on this.  Tried all three possible values.


Looking back it looks like a small list but it kept me busy 6 hours ;), so i 
hope it will help somebody else...

___
Monodroid mailing list
Monodroid@lists.ximian.com

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

___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid  
  ___
Monodroid mailing list
Monodroid@lists.ximian.com

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


[mono-android] unable to debug in monodevelop

2011-12-09 Thread John Moore
I'm trying to debug an application from monodevelop.  the app opens on the
device and promptly closes, monodevelop then displays the follow message,
"The connection with the debugger has been lost. The target application may
have exited."  Same error on an emulator.  I ran across a similar issue
with monotouch but no real solution other than upgrading MD and the plug
in.  I'm on MD 2.8.4.1 and M4A plugin is 2.8.4 with no updates available
for either.  any thoughts?
___
Monodroid mailing list
Monodroid@lists.ximian.com

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


[mono-android] SimpleCursorAdapter & Managed Query

2011-12-09 Thread Nathan Blevins
Hey all,

I had simple example that worked a few interations before the latest drop
of Mono for Android.  Basically, I have a class that queries the Booksmarks
content provider and then adds those to a Simple Cursor Adapter.  The code
looks like this:

var BookmarkCursor = ManagedQuery(Browser.BookmarksUri, new String[] {
Browser.BookmarkColumns.Title, Browser.BookmarkColumns.Url }, null, null,
null);
var SpinnerAdapter = new SimpleCursorAdapter( this,
Android.Resource.Layout.SimpleSpinnerItem, BookmarkCursor, new string[] {
Browser.BookmarkColumns.Title }, new int[] { Android.Resource.Id.Text1 });

Whenever I attempt to run this piece of code, I get and
Illegal Argument Exception, looking for an "_id" column.  In some
listsings, I have seen that the _ID column is required in the projection,
though it was not the case previously.  Any suggestions?  (Log Dump Below)

Also, I am aware that this constructor is deprecated.  I am mainly stumped
as to why this no longer works in 2.0...

Nathan

2-10 00:05:23.909 W/InputManagerService(   76): Window already focused,
ignoring focus gain of:
com.android.internal.view.IInputMethodClient$Stub$Proxy@415cec28
12-10 00:06:38.288 D/dalvikvm(  163): GC_CONCURRENT freed 409K, 6% free
10385K/10951K, paused 5ms+7ms
12-10 00:06:47.560 D/AndroidRuntime( 1100):
12-10 00:06:47.560 D/AndroidRuntime( 1100): >> AndroidRuntime START
com.android.internal.os.RuntimeInit <<
12-10 00:06:47.560 D/AndroidRuntime( 1100): CheckJNI is ON
12-10 00:06:48.679 D/AndroidRuntime( 1100): Calling main entry
com.android.commands.am.Am
12-10 00:06:48.759 D/dalvikvm( 1110): Not late-enabling CheckJNI (already
on)
12-10 00:06:48.789 I/ActivityManager(   76): Start proc
Databinding_Cursor.Databinding_Cursor for broadcast
Databinding_Cursor.Databinding_Cursor/mono.android.Seppuku: pid=1110
uid=10042 gids={3003}
12-10 00:06:48.979 I/ActivityThread( 1110): Pub
Databinding_Cursor.Databinding_Cursor.__mono_init__:
mono.MonoRuntimeProvider
12-10 00:06:49.019 D/dalvikvm( 1110): Trying to load lib
/data/data/Databinding_Cursor.Databinding_Cursor/lib/libmonodroid.so
0x41358580
12-10 00:06:49.019 D/dalvikvm( 1110): Added shared lib
/data/data/Databinding_Cursor.Databinding_Cursor/lib/libmonodroid.so
0x41358580
12-10 00:06:49.069 W/MonoDroid-Debugger( 1110): Not starting the debugger
as the timeout value has been reached; current-time: 1323493609  timeout:
1323493488
12-10 00:06:49.309 I/monodroid-gc( 1110): environment supports jni
NewWeakGlobalRef
12-10 00:06:49.649 D/Zygote  (   35): Process 1110 exited cleanly (255)
12-10 00:06:49.659 I/ActivityManager(   76): Process
Databinding_Cursor.Databinding_Cursor (pid 1110) has died.
12-10 00:06:49.689 D/AndroidRuntime( 1100): Shutting down VM
12-10 00:06:49.709 I/AndroidRuntime( 1100): NOTE: attach of thread 'Binder
Thread #3' failed
12-10 00:06:49.721 D/dalvikvm( 1100): GC_CONCURRENT freed 99K, 77% free
479K/2048K, paused 0ms+1ms
12-10 00:06:51.430 D/AndroidRuntime( 1136):
12-10 00:06:51.430 D/AndroidRuntime( 1136): >> AndroidRuntime START
com.android.internal.os.RuntimeInit <<
12-10 00:06:51.440 D/AndroidRuntime( 1136): CheckJNI is ON
12-10 00:06:52.699 D/AndroidRuntime( 1136): Calling main entry
com.android.commands.am.Am
12-10 00:06:52.770 I/ActivityManager(   76): START
{act=android.intent.action.MAIN flg=0x1000
cmp=Databinding_Cursor.Databinding_Cursor/databinding_cursor.SpinnerSample}
from pid 1136
12-10 00:06:52.779 W/WindowManager(   76): Failure taking screenshot for
(180x300) to layer 21005
12-10 00:06:52.840 D/AndroidRuntime( 1136): Shutting down VM
12-10 00:06:52.880 I/AndroidRuntime( 1136): NOTE: attach of thread 'Binder
Thread #3' failed
12-10 00:06:52.960 D/dalvikvm( 1147): Not late-enabling CheckJNI (already
on)
12-10 00:06:52.960 D/dalvikvm( 1136): GC_CONCURRENT freed 98K, 77% free
477K/2048K, paused 2ms+36ms
12-10 00:06:52.991 I/ActivityManager(   76): Start proc
Databinding_Cursor.Databinding_Cursor for activity
Databinding_Cursor.Databinding_Cursor/databinding_cursor.SpinnerSample:
pid=1147 uid=10042 gids={3003}
12-10 00:06:53.509 W/NetworkManagementSocketTagger(   76):
setKernelCountSet(10042, 1) failed with errno -2
12-10 00:06:54.309 I/ActivityThread( 1147): Pub
Databinding_Cursor.Databinding_Cursor.__mono_init__:
mono.MonoRuntimeProvider
12-10 00:06:54.400 D/dalvikvm( 1147): Trying to load lib
/data/data/Databinding_Cursor.Databinding_Cursor/lib/libmonodroid.so
0x41359538
12-10 00:06:54.419 D/dalvikvm( 1147): Added shared lib
/data/data/Databinding_Cursor.Databinding_Cursor/lib/libmonodroid.so
0x41359538
12-10 00:06:54.481 W/MonoDroid-Debugger( 1147): Trying to initialize the
debugger with options:
--debugger-agent=transport=dt_socket,loglevel=0,address=127.0.0.1:8933
,server=y,embedding=1
12-10 00:06:54.481 W/MonoDroid-Debugger( 1147): Accepted stdout connection:
41
12-10 00:06:54.609 W/NetworkManagementSocketTagger(   76):
setKernelCountSet(10004, 0) failed with errno -2
12-10 00:06:57.119 I/monodroid-gc( 1147): environme