Re: [mono-android] Github.MonodroidSamples.APIDemo Assets filename casing problem

2011-09-26 Thread Atsushi Eno
Hello,

Are your ApiDemos files on your machine somehow under some
symbolik link directory?

I had been having that issue in my development machine and I
have a fix for me, but it does not always reproduce nor others don't
experience that, and hence left buggy...

(My fix works only for Posix platforms so it's not for you anyways.)

If it's not the case for you, then I have no idea why it happens.

Atsushi Eno

> Hi
>
> We have worked this weekend too...
>
> Tried to explain layout reuse (like UserControls) and got following 
> exception:
> MonoDroid.Utils.CommandFailedException:
> Operation is not valid due to the current state of the object
> by mandroid.exe
>
> Googled and led us to original post (by us/me) about resources and 
> filename casing in
> monodroid samples.
>
>1. Selector for pngs
>   There is selector in xml file to select png to display. Probably
>   java code is generated
>   based on this xml.
>   
>  xmlns:android="http://schemas.android.com/apk/res/android";
>   >
>  android:state_pressed="true" />
>  android:state_focused="true" />
>   
>   
>   To solve exception AndroidPressed was changed to androidpressed
>2. xml layout (wrapped in  tag) for reuse.
>   Idea was for hardcore .netters to explain "Simulation" of
>   UserControls
>
>   main layout 
>
>   
>  xmlns:android="http://schemas.android.com/apk/res/android";
>   
>   android:orientation="vertical"
>   android:layout_width="fill_parent"
>   android:layout_height="fill_parent"
>   >
>
>  android:id="@+id/MyButton"
>   android:layout_width="fill_parent"
>   android:layout_height="wrap_content"
>   android:text="@string/Hello"
>   />
>  android:layout_width="wrap_content"
>   android:layout_height="wrap_content"
>   android:layout_alignParentBottom="true">
>   
>   
>   
>
>   And UserControlAdvertizer looked like
>  xmlns:android="http://schemas.android.com/apk/res/android";
>   >
>  android:id="@+id/UserControlAdvertizer"
>   android:layout_width="fill_parent"
>   android:layout_height="fill_parent"
>   android:orientation="vertical"
>   xmlns:android="http://schemas.android.com/apk/res/android";
>   
>   >
>  android:id="@+id/textViewAdvertisement"
>   android:layout_width="wrap_content"
>   android:layout_height="wrap_content"
>   android:text="Add"
>   />
>
>   
>   
>
>   We colud not get rid off exception until filenames in parent
>   control/layout
>   for child layouts/controls were not lowercase
>
> It seems that this exception can be avoided if in parent/master layout 
> ids that are mapped
> to filenames should be lowercase, cos this is probably where 
> java/native-stuff steps in and
> it is mostly done in lowercase...
>
> greetings
>
> mel
>
>
>
> On 2011.09.21 10:53, Miljenko Cvjetko wrote:
>> HI
>>
>> I know this Asset naming problem is known, just it would be nice to 
>> correct
>> samples on github for those which are not familiar with this issue 
>> and for those
>> to come.
>>
>> For a purpose of one presentationfor several students, just pulled 
>> src from github
>> yesterday and got error.
>>
>> Problem:
>>
>>1. Select device started, message "Packaging Application"
>>2. new window "Packaging failed"
>>   Could not create the Android package. See the Output (Build)
>>   window for more details.
>>3. Output/Build:
>>   C:\Program Files\MSBuild\Novell\mandroid.exe -v --nosign
>>   --sdk-dir="C:\Program Files\Android\android-sdk-windows"
>>   
>> --builddir="D:\SRC\MonoDroid\monodroid-samples\ApiDemo\obj\Debug\android"
>>   --framework-dir="C:\Program Files\Reference
>>   Assemblies\Microsoft\Framework\MonoAndroid\v2.2"
>>   --framework-dir="C:\Program Files\Reference
>>   Assemblies\Microsoft\Framework\MonoAndroid\v1.0"
>>   -S="D:\SRC\MonoDroid\monodroid-samples\ApiDemo\obj\Debug\res"
>>   --package="mono.samples.apidemo" --nolink --abi="armeabi"
>>   --java-sdk-dir="C:\Program Files\Java\jdk1.6.0_26" --debug
>>   
>> --manifest-template="D:\SRC\MonoDroid\monodroid-samples\ApiDemo\Properties\AndroidManifest.xml"
>>   --sdk-platform="8"
>>   -A="D:\SRC\MonoDroid\monodroid-samples\ApiDemo\obj\Debug\assets" 
>> "D:\SRC\MonoDroid\monodroid-samples\ApiDemo\bin\Debug\MonoDroid.ApiDemo.dll"
>>   "C:\Program Files\Reference
>>   Assemblies\Microsoft\Framework\MonoAndroid\v2.2\Mono.Android.dll"
>>   "C:\Program Files\Reference
>>   Assemblies\Microsoft\Framework\MonoAndroid\v1.0\mscorlib.dll"
>>   "C:\Program Files\Reference
>>   Assemblies\Microsoft\Framework\MonoAndr

Re: [mono-android] Github.MonodroidSamples.APIDemo Assets filename casing problem

2011-09-26 Thread Miljenko Cvjetko

Hi Atsushi

On 2011.09.26 09:21, Atsushi Eno wrote:

Hello,

Are your ApiDemos files on your machine somehow under some
symbolik link directory?


No. Plain Windows (Vista, separate partition for projects).



I had been having that issue in my development machine and I
have a fix for me, but it does not always reproduce nor others don't
experience that, and hence left buggy...


We can fix it too, and get around, but thought (cos those are the 
samples) it would

not harm to report and see what is going on in there.




(My fix works only for Posix platforms so it's not for you anyways.)

If it's not the case for you, then I have no idea why it happens.

I believe it is not the case for us, but this is what I suspect:

1. API demo (newly pulled from git)
1. error:
   
D:\SRC\MonoDroid\monodroid-samples\ApiDemo\Resources\drawable\android_button.xml(4):
   error 1:
   No resource found that matches the given name (at 'drawable'
   with value '@drawable/AndroidPressed').
   [D:\SRC\MonoDroid\monodroid-samples\ApiDemo\ApiDemo.csproj]
2. android_button.xml
   
   http://schemas.android.com/apk/res/android";>
   
   
   
   
3. Compile is fine, but it crashes on packaging!
4. renaming AndroidPressed.png to androidpressed.png leads to
   expected packaging error
   
D:\SRC\MonoDroid\monodroid-samples\ApiDemo\Resources\drawable\android_button.xml(4):
   error 1:
   No resource found that matches the given name (at 'drawable'
   with value '@drawable/AndroidPressed').
   [D:\SRC\MonoDroid\monodroid-samples\ApiDemo\ApiDemo.csproj]
5. changing "@drawable/AndroidPressed" to
   "@drawable/androidpressed" in android_button.xml
   Does the job!
2. our "UserControl" sample (layout reuse) with
1. "Form" Main.axml
   
   http://schemas.android.com/apk/res/android";
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>

   
   
   
   
   

2. "UserControl" UserControlAdvertizer.axml
   http://schemas.android.com/apk/res/android";>
   http://schemas.android.com/apk/res/android";
>
   

   
   

3. sample crashes on packaging again:
   C:\Program
   Files\MSBuild\Novell\Novell.MonoDroid.Common.targets(399,2):
   error MSB6006:
   "mandroid.exe" exited with code 1.
   [csproj]

   C:\Program Files\MSBuild\Novell\mandroid.exe -v --nosign
   --sdk-dir="C:\Program Files\Android\android-sdk-windows"
   
--builddir="D:\SRC\HolisticWare\HolisticWare.MonoAds\Project\obj\Debug\android"
   --framework-dir="C:\Program Files\Reference
   Assemblies\Microsoft\Framework\MonoAndroid\v2.2"
   --framework-dir="C:\Program Files\Reference
   Assemblies\Microsoft\Framework\MonoAndroid\v1.0"
   -S="D:\SRC\HolisticWare\HolisticWare.MonoAds\Project\obj\Debug\res"
   --package="Project"   --nolink --abi="armeabi"
   --java-sdk-dir="C:\Program Files\Java\jdk1.6.0_26" --debug
   
--manifest-template="D:\SRC\HolisticWare\HolisticWare.MonoAds\Project\Properties\AndroidManifest.xml"
   --sdk-platform="8"
   "D:\SRC\HolisticWare\HolisticWare.MonoAds\Project\bin\Debug\Project.dll"
   
"D:\SRC\HolisticWare\HolisticWare.MonoAds\HolisticWare.MonoAds\bin\Debug\HolisticWare.MonoAds.DLL_023_BL_mClnt_MDrd_mono26.dll"
   "C:\Program Files\Reference
   Assemblies\Microsoft\Framework\MonoAndroid\v2.2\Mono.Android.dll" 
"C:\Program
   Files\Reference
   Assemblies\Microsoft\Framework\MonoAndroid\v1.0\mscorlib.dll"
   "C:\Program Files\Reference
   Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Core.dll"
   "C:\Program Files\Reference
   Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.dll"
   "C:\Program Files\Reference
   Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.ServiceModel.dll"
   "C:\Program Files\Reference
   Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Web.Services.dll"
   "C:\Program Files\Reference
   Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Xml.dll"
   "C:\Program Files\Reference
   Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Xml.Linq.dll"

  MonoDroid.Utils.CommandFailedException: Operation is not
   valid due to the current state of the object
at
   MonoDroid.Utils.ProcessRocks+c__Iterator6.MoveNext
   () [0x0] in :0
at Monodroid.Toolbox.InvokeCommand (IEnumerable`1
   commandLine) [0x0] in :0
at Monodroid.Toolbox.InvokeAapt (System.String packageName)
   [0x0] in :0
at Monodroid.Droidinator.CreatePackagedResources
   (System.Collections.Generic.List`1 javaTypes) [0x0] in
   :0
at Monodroid.Droidinator.CreateApk () [0x0] in
   :0
at Monodroid.MainClass.Main

[mono-android] Few nictetohaves (VS addin UX)

2011-09-26 Thread Miljenko Cvjetko

Hi

Few ideas (from UX standpoint) during investigation and writeup in last 
thread

(Github.MonodroidSamples.APIDemo Assets filename casing problem) came up:

1. is there a need for
1. starting the Form "Select Device" (and Emulator) before
   packaging is finished?
   it would be nice to get packaging errors in Error and Output
   Window first
   Form starts, packaging fails, close everything to look in VS
   Output window for
   mandroid errors...
2. "Select Device" to be modal
   this was already mentioned as far as I can remember,
2. For those errors after "Select Device" selectable TextBox would be
   nice, so exceptions
   can be easily copied.
3. Besides selecting rows in ListView for ADB Logcat window, to add
   copy to clipboard?
4. Add commandline options for emulator in "Start Emulator" dialog.

Hope this is not too much, but would add a bit to UX when working.

thanks + 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] Date Format in Monodroid

2011-09-26 Thread was
Thanks Glen. However, the issue I have is that my dates are always formatted
according to the Android device's 'Settings>Language & keyboard>Select
Locale' setting. The 'Settings>Date & time' format has no effect. I can't
figure out how to get the  'Settings>Date & time' format to override the
locale format if it's different.

Regards...Andrew

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Date-Format-in-Monodroid-tp4838662p4840744.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] Graphics painting and "normal" controlls together?

2011-09-26 Thread moelski
Hi !

I have to implement some very simple traffic light to show an overall
status.
And I found some inspiration in the compass demo. :)

I got some basic drawings that work fine for me: 


But now I have a question ... 
How can I add some basic controls like a textview to that view? I tried this
but it won´t work for me: 


Any hint ?

Best regards 
  Dominik 

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Graphics-painting-and-normal-controlls-together-tp4840757p4840757.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] Few nictetohaves (VS addin UX)

2011-09-26 Thread Andreia Gaita
Hi,

Thanks for the input! We're working on improving the usability of our tools,
and those issues you've identified are already on our list of fixes for the
VS plugin for upcoming releases, so stay tuned :)

-- andreia

On Mon, Sep 26, 2011 at 10:19 AM, Miljenko Cvjetko <
mcvje...@holisticware.net> wrote:

>  Hi
>
> Few ideas (from UX standpoint) during investigation and writeup in last
> thread
> (Github.MonodroidSamples.APIDemo Assets filename casing problem) came up:
>
>1. is there a need for
>   1. starting the Form "Select Device" (and Emulator) before packaging
>   is finished?
>   it would be nice to get packaging errors in Error and Output Window
>   first
>   Form starts, packaging fails, close everything to look in VS Output
>   window for
>   mandroid errors...
>2. "Select Device" to be modal
>   this was already mentioned as far as I can remember,
>2. For those errors after "Select Device" selectable TextBox would
>be nice, so exceptions
>can be easily copied.
>3. Besides selecting rows in ListView for ADB Logcat window, to add
>copy to clipboard?
> 4. Add commandline options for emulator in "Start Emulator" dialog.
>
> Hope this is not too much, but would add a bit to UX when working.
>
> thanks + 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
>
>


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

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


Re: [mono-android] Mono code as Android Service and IPC speed estimations

2011-09-26 Thread JonV
Igor Russkih  writes:

> Second question is service <-> UI interaction part. Normally this is done with
> AIDL in java.. I haven't found any words on aidl support in monodroid. Guess 
> it
> could be implemented 'manually' - is there any experience exist in this area?

Sorry to resurrect an old topic like this, but I'm curious if anyone's done any
more work in this area. I'm essentially trying to solve the same problem as Igor
(an Android C# Service implemented with Mono for Android, consumed by native
Android Java Activities), and I'd be very interested to see any samples or 
proofs
of concepts that might be out there.

___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] XmlSerializer deserialization exception

2011-09-26 Thread zeysoft
I'm port .NET project to Monodroid. 

I use an XML File to save the settings. With VS2010 xsd.exe tool I generate
classes that correspond to 
http://mono-for-android.1047100.n5.nabble.com/file/n4822129/appschema.xsd
this schema . When loading an XML application throws this exeption: 
http://mono-for-android.1047100.n5.nabble.com/file/n4829762/exception.txt
exception.txt 

In PC this work with .NET 2. Generated classes and xml is the same in both
projects.

Any idea.

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/XmlSerializer-deserialization-exception-tp4822129p4841046.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] Date Format in Monodroid

2011-09-26 Thread was
Right, the problem is that UseUserOverride is false in the following:

 System.Globalization.CultureInfo ci =
System.Globalization.CultureInfo.InstalledUICulture; 
DateTimeFormatInfo dtfi = ci.DateTimeFormat;
if (ci.UseUserOverride)...

even when Settings>Date & time>Automatic is unchecked. Using 'Select date
format' has no effect on my device. Any ideas?

Regards...Andrew

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Date-Format-in-Monodroid-tp4838662p4842043.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] How to deploy App To Market

2011-09-26 Thread mcgear
It appears that this was exactly my issue.

I changed the setting to only link SDK Assemblies, and not User Assemblies
and the app now works in Release build and without the extra Mono Runtime
APKs installed.

Thank you all for the help!

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/How-to-deploy-App-To-Market-tp4774508p4842086.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] Date Format in Monodroid

2011-09-26 Thread Jonathan Pryor
On Sep 26, 2011, at 5:33 AM, was wrote:
> Thanks Glen. However, the issue I have is that my dates are always formatted
> according to the Android device's 'Settings>Language & keyboard>Select
> Locale' setting. The 'Settings>Date & time' format has no effect. I can't
> figure out how to get the  'Settings>Date & time' format to override the
> locale format if it's different.

This is probably a Mono for Android bug, as we set the LANG environment 
variable at startup to the Locale setting, but we don't set any environment 
variable overrides that the user might set. (Meaning your default output will 
be based on the default locale, but not on any specific overrides.)

Please file a bug with instructions on how to reproduce (e.g. what to set 
Settings > Date & time to, and what the in-app output should be).

Thanks,
 - Jon

___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] XmlSerializer deserialization exception

2011-09-26 Thread Jonathan Pryor
On Sep 26, 2011, at 7:37 AM, zeysoft wrote:
> I use an XML File to save the settings. With VS2010 xsd.exe tool I generate
> classes that correspond to 
> http://mono-for-android.1047100.n5.nabble.com/file/n4822129/appschema.xsd
> this schema . When loading an XML application throws this exeption: 
> http://mono-for-android.1047100.n5.nabble.com/file/n4829762/exception.txt
> exception.txt 

How are you loading the XML file? That looks rather similar to:

http://bugzilla.xamarin.com/show_bug.cgi?id=1054

 - Jon

___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] Mono code as Android Service and IPC speed estimations

2011-09-26 Thread Jonathan Pryor
On Sep 26, 2011, at 6:45 AM, JonV wrote:
> I'm essentially trying to solve the same problem as Igor (an Android C# 
> Service implemented with Mono for Android, consumed by native
> Android Java Activities), and I'd be very interested to see any samples or 
> proofs of concepts that might be out there.

We have no performance measurements, but we do have a sample service written in 
C#:


https://github.com/xamarin/monodroid-samples/blob/master/ApiDemo/App/LocalService.cs

Perhaps you could write a Java client to invoke that service? :-)

 - Jon

___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] emulation devise

2011-09-26 Thread Jonathan Pryor
On Sep 24, 2011, at 5:34 PM, Prokopis Prokopiou wrote:
> am a student and am doing know my final project on android using visual 
> studio and c#
> i don't have tha ability to get the mono application. is there a possibility 
> to have a full version of the application for a period of time so i can done 
> my project?
> i just want to use my htc mobile as an emulator devise due to that am going 
> to use the bluetooth and the gprs of the mobile

We offer a student edition at reduced price:

http://blog.xamarin.com/2011/08/18/back-to-school/

but we do not currently offer a time-limited version at this time.

Thanks,
 - Jon

___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] sharing violation and a method which seems to run twice

2011-09-26 Thread Jonathan Pryor
On Sep 25, 2011, at 12:07 PM, John Murray wrote:
> I've detached all the code into a simple Android buttonclick demo 
> (pretty much how it all works in my app - it is called as a separate
> activity )
> It demonstrates the same issue of going through the GetWind(ds) method twice

Can we find this example somewhere? :-)

Another possibility is that somehow your form initialization code is running 
twice, and thus you're subscribing to the Click event twice on the same Button, 
and not properly closing the stream in between each event handler invocation...

Source would help. :-)

 - Jon

___
Monodroid mailing list
Monodroid@lists.ximian.com

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