Re: [mono-android] Updating a View using a Timer

2012-06-01 Thread g pe
In .NET you have System.Timers.Timer and System.Diagnostics.Stopwatch. I
don't know what else do you need? Maybe a call to View.Invalidate() to
force a refresh of your View. Or PostInvalidate() if you are in another
thread.

On Fri, Jun 1, 2012 at 2:34 PM, Saeid Yazdani  wrote:

> Dear Freinds!
>
> I am working on a android program to receive data from a microcontroller
> through wifi to draw data points over time.
>
> I have set up a simple View and also I managed to connect to WiFi module on
> the microcontroller using sockets, now I really need to know what should I
> do to reterive data based on a time interval. For example I want to get the
> data from the microcontroller every 100 ms and update the View on android
> (Adding points to the graph).
>
> Any kind of help and code samples will be really appriciated.
>
> Regards,
> Saeid.
>
> --
> View this message in context:
> http://mono-for-android.1047100.n5.nabble.com/Updating-a-View-using-a-Timer-tp5710118.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
>



-- 
Regards,
Gpe
___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] OpenGL API performance

2012-07-16 Thread g pe
Do you use the short or the long solution then?

On Mon, Jul 16, 2012 at 9:23 AM, l0nestar wrote:

> That makes a huge difference. Thanks for that.
>
> ** **
>
> *From:* Jonathan Pryor-2 [via Mono for Android] [mailto:[hidden 
> email]]
>
> *Sent:* 13 July 2012 16:07
> *To:* l0nestar
> *Subject:* Re: OpenGL API performance
>
> ** **
>
> On Jul 13, 2012, at 6:03 AM, l0nestar wrote:
> > I'm trying to optimise my test game. I'm using Android.Opengl.GLES11 to
> do all of my interaction with GL. However it seems to me that the cost for
> calling the API is quite high. I assume that each call i make to GLES11
> maps to an equivalent java call, is there a cost associated with this
> transition?
>
> Yes. It's...not cheap.
>
> Short version: if at all possible, use OpenTK or MonoGame. (This will also
> result in code that is more portable to other platforms - Win!)
>
> Long version: All bindings of Java types involve lots of JNI glue code,
> via the JNIEnv type:
>
> click here.
> NAML
> 
>
>
> --
> View this message in context: RE: OpenGL API 
> performance
>
> Sent from the Mono for Android mailing list 
> archiveat 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] Profiling application

2012-07-17 Thread g pe
Ooh that is a good point! My application is for now only drawing on the
Canvas but all the pre-processing of the shapes etc is done on the same
thread. Even though it always has been in the plan to separate everything
in correct threads, it's still to be done. That could be enough to solve
our current slowness we have (250ms for a drawing, some path to draw and
fill).

Thanks for the hint!


On Tue, Jul 17, 2012 at 10:38 PM, Tossing, Chris
wrote:

> We don't use a profiler with M4A, so I don't have one to suggest, but
> performance problems can many times be due to performing CPU-intensive
> operations on the UI thread.  If you are doing that, I strongly suggest you
> don't.  Any kind of complex calculation or database access should be done
> using a background thread - a mechanism such as
> ThreadPool.QueueUserWorkItem(...) works well for us.
> http://msdn.microsoft.com/en-us/library/system.threading.threadpool.queueuserworkitem.aspx
>
> One important gotcha is that you need to call Context.RunOnUiThread(...)
> when updating the UI from the background thread.
>
> Chris Tossing
> Software Engineer
> G4S Technology Software Solutions LLC
> Direct Dial:  +1 (781) 457-0779
> Cell:+1 (847) 942-0359
> chris.toss...@usa.g4s.com
> www.1f.com
> 21 North Avenue, Burlington, Massachusetts 01803 USA
>
> Please consider the environment before printing this email
>
>
> -Original Message-
> From: monodroid-boun...@lists.ximian.com [mailto:
> monodroid-boun...@lists.ximian.com] On Behalf Of gpe
> Sent: Tuesday, July 17, 2012 10:45 AM
> To: monodroid@lists.ximian.com
> Subject: [mono-android] Profiling application
>
> Hello,
> I have never done any extensive profiling (performance analysis) work and
> still don't really need it actually. But as my application is running too
> slowly I would like to spot the caveats of my code. It could be as well be
> a
> problem of memory as processor usage.
>
> In Visual Studio (2010) I saw this menu called "Analyze" which allow to
> trace memory allocations and processor time. This is really nice but I do
> not see any way to make it work with Monodroid.
>
> On Android it seems like I should use Traceview. But again I do not know if
> it's even possible with Monodroid (Until now my attempts were
> unsuccessful).
>
>
> What do you use to analyze the performance of your code?
>
> --
> View this message in context:
> http://mono-for-android.1047100.n5.nabble.com/Profiling-application-tp5710923.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
>
>
>
> The details of this company are as follows:
> G4S Technology Limited, Registered Office: Challenge House, International
> Drive, Tewkesbury, Gloucestershire GL20 8UQ, Registered in England No.
> 2382338.
>
> This communication may contain information which is confidential, personal
> and/or privileged.
>
> It is for the exclusive use of the intended recipient(s).
> If you are not the intended recipient(s), please note that any
> distribution, forwarding, copying or use of this communication or the
> information in it is strictly prohibited.
>
> Any personal views expressed in this e-mail are those of the individual
> sender and the company does not endorse or accept responsibility for them.
>
> Prior to taking any action based upon this e-mail message, you should seek
> appropriate confirmation of its authenticity.
>
> This e-mail has been scanned for all viruses by MessageLabs.
> ___
> 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] spinner-like touch(steering)wheel

2012-08-08 Thread g pe
What have started with? What's blocking you here?
Have you drawn you picture? Have you found how to rotate it? Do you get
your interaction events?
You can find tons of samples about this.

What is blocking you about monodroid?


On Wed, Aug 8, 2012 at 9:32 AM, JLee  wrote:

> have to push this thread a little bit, cause i still dont have a clue, how
> i
> can do that.
> has anyone an idea or a hint for me?
>
>
>
>
> --
> View this message in context:
> http://mono-for-android.1047100.n5.nabble.com/spinner-like-touch-steering-wheel-tp5711195p5711218.html
> Sent from the Mono for Android mailing list archive at Nabble.com.
> ___
> Monodroid mailing list
> Monodroid@lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
>
___
Monodroid mailing list
Monodroid@lists.ximian.com

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


[mono-android] Logging system

2012-08-08 Thread g pe
Hi everybody,

Which logging system do you use. Is it worth developing some TraceListener
or are there library already working on monodroid and monotouch(log4net)?

The TraceListener approach seems to work on windows and Android but I
didn't have a chance to make log4net run on Android yet. Therefore, before
going further, I would like to know about your experience(s).
___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] Logging system

2012-08-09 Thread g pe
Have you checked this patch
https://issues.apache.org/jira/browse/LOG4NET-338  ?

On Thu, Aug 9, 2012 at 10:31 AM, Miljenko Cvjetko  wrote:

>  Hi
>
> Few weeks ago, after finishing SharpSNMP (quick and dirty port), I did
> analysis for log4net and entlib.
> We use log4net on some projects and entlib is foundation of Composite C1
> CMS system that we use a lot
> and would like to see that on mono.
> For entlib I just took a glance, so no details, but for log4net is
> following (take a look at their defines).
>
>- WP
>167 errors (I will skip details)
> - System.Collections.ArrayList
>   - XmlSerialization (allways)
>- + a lot more
>- MA (should be similar for MT)
>33 errors
>   - System.Web
>  - namespace
>  - HttpContext
>   - MailPriority (System.Web.Mail vs System.Net.Mail)
>   - System.Data (ADO.net)
>- System.IO (FileSystemWatcher, FileSystemEventHandlers)
>
>  So to split everything up and patch we have estimated 3-5 man days and
> decided to do it in September/October.
> Right now have not enought time to do it...
>
> cheers
>
> mel
>
>
> MA compile errors
>
> The type or namespace name 'Web' does not exist in the namespace 'System'
> (are you missing an assembly reference?)
>
> The type or namespace name 'RenamedEventArgs' could not be found (are you
> missing a using directive or an assembly reference?)
> The type or namespace name 'MailPriority' could not be found (are you
> missing a using directive or an assembly reference?)
>
> The type or namespace name 'IDbTransaction' could not be found (are you
> missing a using directive or an assembly reference?)
> The type or namespace name 'IDbConnection' could not be found (are you
> missing a using directive or an assembly reference?)
> The type or namespace name 'IDbCommand' could not be found (are you
> missing a using directive or an assembly reference?)
>
> The type or namespace name 'IConfigurationSectionHandler' could not be
> found (are you missing a using directive or an assembly reference?)
>
> The type or namespace name 'HttpContext' could not be found (are you
> missing a using directive or an assembly reference?)
>
> The type or namespace name 'FileSystemWatcher' could not be found (are you
> missing a using directive or an assembly reference?)
> The type or namespace name 'FileSystemEventArgs' could not be found (are
> you missing a using directive or an assembly reference?)
> The type or namespace name 'EventLogEntryType' could not be found (are you
> missing a using directive or an assembly reference?)
> The type or namespace name 'DbType' could not be found (are you missing a
> using directive or an assembly reference?)
>
>
> The type or namespace name 'Data' does not exist in the namespace 'System'
> (are you missing an assembly reference?)
> The type or namespace name 'ConfigurationSettings' does not exist in the
> namespace 'System.Configuration' (are you missing an assembly reference?)
>
> The type or namespace name 'ConfigurationException' does not exist in the
> namespace 'System.Configuration' (are you missing an assembly reference?)
>
> The type or namespace name 'CommandType' could not be found (are you
> missing a using directive or an assembly reference?)
> The name 'SmtpMail' does not exist in the current context
> The name 'NotifyFilters' does not exist in the current context
> The name 'HttpRuntime' does not exist in the current context
> Property or indexer 'System.Net.Mail.MailMessage.To' cannot be assigned
> to -- it is read only
> Property or indexer 'System.Net.Mail.MailMessage.Bcc' cannot be assigned
> to -- it is read only
> Cannot implicitly convert type 'string' to
> 'System.Net.Mail.MailAddressCollection'
> Cannot implicitly convert type 'string' to 'System.Net.Mail.MailAddress'
>
> 'System.Net.Mail.MailMessage' does not contain a definition for 'Cc' and
> no extension method 'Cc' accepting a first argument of type
> 'System.Net.Mail.MailMessage' could be found (are you missing a using
> directive or an assembly reference?)
> 'log4net.Config.RenamedEventHandler' does not contain a constructor that
> takes 1 arguments
> 'log4net.Config.RenamedEventArgs' does not contain a definition for
> 'ChangeType' and no extension method 'ChangeType' accepting a first
> argument of type 'log4net.C

Re: [mono-android] Logging system

2012-08-09 Thread g pe
Pretty wise. But I am not sure if  it can be avoided for code targeting
multiple platforms.


On Thu, Aug 9, 2012 at 10:43 AM, Miljenko Cvjetko  wrote:

>  Hi
>
>
> On 2012.08.09 10:35, g pe wrote:
>
> Have you checked this patch
> https://issues.apache.org/jira/browse/LOG4NET-338  ?
>
> No I havent. Honestly, we are trying to stay away from preprocessor
> (#ifs), the next is
> You gonna need #MONOTOUCH etc... Makes code a lot more difficult to read...
>
> cheers
>
> mel
>
>
>
> On Thu, Aug 9, 2012 at 10:31 AM, Miljenko Cvjetko <
> mcvje...@holisticware.net> wrote:
>
>>  Hi
>>
>> Few weeks ago, after finishing SharpSNMP (quick and dirty port), I did
>> analysis for log4net and entlib.
>> We use log4net on some projects and entlib is foundation of Composite C1
>> CMS system that we use a lot
>> and would like to see that on mono.
>> For entlib I just took a glance, so no details, but for log4net is
>> following (take a look at their defines).
>>
>>- WP
>>167 errors (I will skip details)
>> - System.Collections.ArrayList
>>   - XmlSerialization (allways)
>>- + a lot more
>>- MA (should be similar for MT)
>>33 errors
>>   - System.Web
>>  - namespace
>>  - HttpContext
>>   - MailPriority (System.Web.Mail vs System.Net.Mail)
>>   - System.Data (ADO.net)
>>- System.IO (FileSystemWatcher, FileSystemEventHandlers)
>>
>>  So to split everything up and patch we have estimated 3-5 man days and
>> decided to do it in September/October.
>> Right now have not enought time to do it...
>>
>> cheers
>>
>> mel
>>
>>
>> MA compile errors
>>
>> The type or namespace name 'Web' does not exist in the namespace 'System'
>> (are you missing an assembly reference?)
>>
>> The type or namespace name 'RenamedEventArgs' could not be found (are you
>> missing a using directive or an assembly reference?)
>> The type or namespace name 'MailPriority' could not be found (are you
>> missing a using directive or an assembly reference?)
>>
>> The type or namespace name 'IDbTransaction' could not be found (are you
>> missing a using directive or an assembly reference?)
>> The type or namespace name 'IDbConnection' could not be found (are you
>> missing a using directive or an assembly reference?)
>> The type or namespace name 'IDbCommand' could not be found (are you
>> missing a using directive or an assembly reference?)
>>
>> The type or namespace name 'IConfigurationSectionHandler' could not be
>> found (are you missing a using directive or an assembly reference?)
>>
>> The type or namespace name 'HttpContext' could not be found (are you
>> missing a using directive or an assembly reference?)
>>
>> The type or namespace name 'FileSystemWatcher' could not be found (are
>> you missing a using directive or an assembly reference?)
>> The type or namespace name 'FileSystemEventArgs' could not be found (are
>> you missing a using directive or an assembly reference?)
>> The type or namespace name 'EventLogEntryType' could not be found (are
>> you missing a using directive or an assembly reference?)
>> The type or namespace name 'DbType' could not be found (are you missing a
>> using directive or an assembly reference?)
>>
>>
>> The type or namespace name 'Data' does not exist in the namespace
>> 'System' (are you missing an assembly reference?)
>> The type or namespace name 'ConfigurationSettings' does not exist in the
>> namespace 'System.Configuration' (are you missing an assembly reference?)
>>
>> The type or namespace name 'ConfigurationException' does not exist in the
>> namespace 'System.Configuration' (are you missing an assembly reference?)
>>
>> The type or namespace name 'CommandType' could not be found (are you
>> missing a using directive or an assembly reference?)
>> The name 'SmtpMail' does not exist in the current context
>> The name 'NotifyFilters' does not exist in the current context
>> The name 'HttpRuntime' does not exist in the current context
>> Property or indexer 'System.Net.Mail.MailMessage.To' cannot be assigned
>> to -- it is read only
>> Property or indexer 'System.Net.Mail.MailMessage.Bcc' cannot be assigned
>

Re: [mono-android] Service permissions

2012-08-09 Thread g pe
Hi doctor. Wouldn't it be the 'or' character?   |

On Thu, Aug 9, 2012 at 2:36 PM, drstrange  wrote:

> Hi,
>
> I can't seem to find any info on how to specify more than one permission
> for
> a service. The service will need both INTERNET and LOCATION permissions,
> but
> the ServiceAttribute seems to only allow one:
>
> [Service(Enabled=true, Permission="ACCESS_FINE_LOCATION")]
> public class MyService : Service
>
> anybody know how to do this?
>
> DrStrange
>
>
>
> --
> View this message in context:
> http://mono-for-android.1047100.n5.nabble.com/Service-permissions-tp5711247.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
>



-- 
Best regards,

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

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


Re: [mono-android] Splash screen ratio

2012-09-04 Thread g pe
If your using an image you don't have choice but have a big version it. So
you are sure that it is never scaled up. Then for a different ratios either
you have have two bands on the "missing" sides like the black lines on 4:3
TVs showing 16:9 movies. A nice trick would be to have your original image
with already some parts around, here just to fill these gaps, around the
important picture. With a viewport of the same ratio it won't change
anything but when the ratio is different these extra margins would still be
coherent with your picture instead of being plane colors.
('still not sure to be clear ^^)


On Tue, Sep 4, 2012 at 5:28 PM, tsukrov  wrote:

> My main problem is neither density nor size, but hei/wid ratio.
> Android supports long/notlong.
>
> What's the best way for other ratio-s?
>
> drawable-h300dp-w200dp or something like that?
>
>
>
> --
> View this message in context:
> http://mono-for-android.1047100.n5.nabble.com/Splash-screen-ratio-tp5711680p5711684.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
>



-- 
Best regards,

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

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