Re: [mono-android] Option to scale emulator on launch from VS2010 / MonoDevelop

2011-07-24 Thread Jonathan Pobst
There is currently not any options to do that, but it sounds like a good 
idea that we should do.

Would you mind filing an enhancement request for it in our Bugzilla?

http://bugzilla.xamarin.com

Thanks!
Jonathan

On 7/23/2011 8:03 PM, Dean - wrote:
> My laptop's screen resolution is 1366x768, so the top and bottom of the
> Android emulator is cutoff when using the WVGA800 mode.  I can telnet
> into the emulator and run the command "window scale 0.75" to scale the
> window, but I have to do this everytime it's launched.  I believe the
> Eclipse environment provides for command line options to automatically
> be passed to the emulator when launched.  Is there anything similar for
> Mono for Android?  I don't see anything in the Settings, but perhaps
> there's a file that can be edited that contains the default command line
> parameters.  Anyone know?
>
> Thanks,
>
> Dean
>
>
>
>
> ___
> 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] Option to scale emulator on launch from VS2010 / MonoDevelop

2011-07-24 Thread Dean -
Okay, I've logged an enhancement request (Bug #56).  While we wait for this
to be implemented, I've developed a workaround that is completely
transparent.  If anyone's interested, please see my post at the URL below:

http://sadata.com/post/2011/07/24/Passing-additional-parameters-to-Android-emulator-from-MonoDroid.aspx

Thanks,

Dean



On Sun, Jul 24, 2011 at 10:57 AM, Jonathan Pobst  wrote:

> There is currently not any options to do that, but it sounds like a good
> idea that we should do.
>
> Would you mind filing an enhancement request for it in our Bugzilla?
>
> http://bugzilla.xamarin.com
>
> Thanks!
> Jonathan
>
> On 7/23/2011 8:03 PM, Dean - wrote:
>
>> My laptop's screen resolution is 1366x768, so the top and bottom of the
>> Android emulator is cutoff when using the WVGA800 mode.  I can telnet
>> into the emulator and run the command "window scale 0.75" to scale the
>> window, but I have to do this everytime it's launched.  I believe the
>> Eclipse environment provides for command line options to automatically
>> be passed to the emulator when launched.  Is there anything similar for
>> Mono for Android?  I don't see anything in the Settings, but perhaps
>> there's a file that can be edited that contains the default command line
>> parameters.  Anyone know?
>>
>> Thanks,
>>
>> Dean
>>
>>
>>
>>
>> __**_
>> 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] Mono code as Android Service and IPC speed estimations

2011-07-24 Thread Jonathan Pryor
On Jul 23, 2011, at 12:45 AM, Igor Russkih wrote:
> Our current idea is to keep this library running in monodroid as an android 
> service (and by this share the main "heavy" buisness logic code between 
> WM/android projects), and to create a UI wrapper. (it most probably will be 
> in native java).

Using Mono for Android to create a UI wrapper makes sense, but why do you want 
to run your library as an Android service? Android.App.Service has a main loop, 
just like Android.App.Activity, and it's the _same_ main loop that activities 
use. Consequently, it is _not_ the thread you want to be doing high data 
throughput  algorithms on that thread, as it would lock up your UI. You want to 
use some background thread (e.g. a dedicated System.Threading.Thread) instead.

> Is it possible to work with android BT API directly from monodroid code?

There is an Android.Bluetooth namespace which allows use of bluetooth devices:

http://docs.mono-android.net/Android.Bluetooth

> How efficient it'll be in terms of data transfers?

I don't know. Unfortunately, you would need to profile. Furthermore, I don't 
know if the emulator emulates bluetooth or not; you may need to profile on 
actual hardware to see what the overhead is (and you'd probably want actual 
hardware anyway to see if it's fast enough).

> I mean since monodroid creates wrappers for Input/Output-Streams (does it?) 
> how well stream.read and stream.write will map data? The amounts of data is 
> not high (several bytes), but the request/response rate with BT hardware is 
> required to be as fast as possible. (normally its up to 50Hz). Won't 
> read/write serialization between dalvik/mono be a bottleneck here?

Yes, Android.Runtime.OutputStreamInvoker.Write() will create a new Java-side 
array, copy the contents of the managed array into the byte array, then invoke 
the underlying Java method (which may make additional copies; who knows…).

Whether this will be an actual bottleneck or not requires profiling to answer. 
:-(

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

As mentioned above, I'm not sure you want to use a Service here. That said, 
there is currently no built-in support for AIDL files. If necessary, you could 
probably hack something together by invoking the aidl compiler as a pre-build 
step and including the Java sources (both generated and potentially 
hand-written) into the final app by using the AndroidJavaSource build action, 
then using Android.Runtime.JNIEnv to interact with the Java types. We intend on 
improving AIDL support in a future release, but there is no timeframe.

 - Jon

___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] Sync Adapter and Account Authenticator Services

2011-07-24 Thread Jonathan Pryor
On Jul 22, 2011, at 4:28 PM, BarryJohnston wrote:
> I've been a software developer for 15yrs but I'm new to MonoDroid
> development.  Could you explain about the IParcel?

What's currently missing from mandroid is the support to properly implement the 
IParcelable interface; a related one is java.io.Serializable. The fundamental 
problem is that these interfaces require additional support members -- the 
android.os.Parcelable interface (IParcelable) requires that the interface 
implementation have a `static final CREATOR` field which refers to an instance 
to use for marshaling. mandroid.exe, at present, doesn't support the creation 
of user-specified Java-side fields, in any form; consequently, IParcelable 
can't be implemented in a usable fashion.

java.io.Serializable is similar but different: it requires that the Java type 
provide private writeObject() and readObject() methods. Again, mandroid.exe at 
present doesn't provide any mechanism to add additional methods to the created 
Java code.

> I don't think I'm using that, however I do pass an Intent to 
> Bundle.PutParcelable.

Indeed, you do not appear to be implementing IParcelable, so this shouldn't be 
an issue for you.

If this is crashing the OS for you, could you file a bug at 
bugzilla.xamarin.com so that we can investigate further?

Thanks,
 - Jon

___
Monodroid mailing list
Monodroid@lists.ximian.com

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