Questions tagged [dot42]

Development environment for writing Android apps in C#.

dot42 is a development environment for writing Android apps in C#. The core of dot42 consists of a cross compiler that compiles IL to DEX. Because dot42 compiles to DEX (Dalvik executable format), no runtime is required. C# language features such as delegates, LINQ, generics, events and lambda expression are supported.

dot42 integrates with the following IDEs:

  • SharpDevelop 4.3 (installs with dot42)
  • Visual Studio 2010 Professional
  • Visual Studio 2012 Professional

The Android API is available without limitations as if it were a .NET assembly added as a reference to your project. A large part of the .NET framework is available.

Here is the API reference of all .NET framework types that are currently supported (work in progress): http://docs.dot42.com/Reference/NS.System

When you refer to .NET framework types and compile to an APK, the .NET types compile to a minimum amount of wrapper DEX code that invokes the Android framework. It therefore does not require an extra runtime and makes the APKs really small.

You may import JAR files and access them from your C# code as if they were .NET assemblies. During compilation, your C# code is combined with the JAR file into a single APK.

Official website: dot42.com

All sources are available on https://github.com/dot42.

59 questions
566
votes
6 answers

How to compare the performance of Android Apps written in Java and Xamarin C#? Anyway to check quantitative data (code & results)

I came across Xamarin claims that their Mono implementation on Android and their C# compiled apps are faster than Java code. Did anyone perform actual benchmarks on very similar Java and C# code on different Android platforms to verify such claims,…
gregko
  • 5,642
  • 9
  • 49
  • 76
12
votes
2 answers

How to implement Android callbacks in C# using async/await with Xamarin or Dot42?

How do you implement callbacks in C# using async/await with Xamarin for Android? And how does this compare to standard Java programming for Android?
gregko
  • 5,642
  • 9
  • 49
  • 76
3
votes
0 answers

How do I specify application version in dot42 project?

How do I specify apk version for dot42 project? I look into my project obj folder, and AndroidManifest.xml has android:versionName="0.0.0.0". How do I change that? UPDATE: Found it. [assembly: Package(VersionName = "1.0.0")]
galets
  • 17,802
  • 19
  • 72
  • 101
3
votes
1 answer

Why "using Net.Sockets " is missing in dot42 C# android?

I'm trying to write a small chat over TCP/IP in dot42 using c#. The problem is the "Net.Sockets" is missing !! It's odd because it's part of the System in C#. using System; using Android.App; using Android.Os; using Android.Widget; using…
telcom
  • 145
  • 10
2
votes
1 answer

How to unsubscribe an event with dot42

I've a static class called "BatteryManagerHelper" wich monitors battery status via the Intent.ACTION_BATTERY_CHANGED intent. Each time system notifies a change in battery status, my class catch the changes, stores new values in the class public…
minimega
  • 37
  • 6
2
votes
0 answers

dot42 Reject Incoming Call

I want reject incoming call using dot42 in VS2012, this is sample my code [Receiver(Enabled = true)] [IntentFilter( Actions = new[] { "android.intent.action.PHONE_STATE" }, Categories = new[] { Intent.CATEGORY_DEFAULT }, …
2
votes
1 answer

HOw do you uninstall Dot42

Two weeks ago I downloaded and installed Dot42AndroidSetup.exe. There was helpful info on running Android on Hyper-V and hopeful possibilities about using VS and C# to directly target Android x86 and debug. Since then I've seen strange behavior from…
2
votes
1 answer

Asynchronous SQLite sample with dot42?

I've been testing dot42 and so far great, but I see that there aren't any SQLite samples. Im not sure if I should implement a ContentProvider (as some android articles suggests) or if I could use the async / wait implementation of dot42 in order to…
2
votes
2 answers

How to create classes with dot42 in Visual Studio?

I just found out about dot42, a C# way to develop native Android Apps. So my first project way to use some old code for generating CRC8 bytes. I created a new class in the project, copied the code over and tried to use it as normal. I keep on…
Piotr Kula
  • 9,597
  • 8
  • 59
  • 85
2
votes
1 answer

Dot 42 - Navigate to HTML in Asset Folder

I am trying to code in C# with DOT42. How do I navigate to an html inside my Assets folder. I have achieved the same wit Eclipse in java with the following Code: @Override protected void onCreate(Bundle savedInstanceState) { …
Pavitar
  • 4,282
  • 10
  • 50
  • 82
2
votes
1 answer

Can't cast enum to int dot42

I'm evaluating the use of dot42 framework to target android using C#.. So while going through what dot42 can and can't do, I got stuck with the following casting not working.. throws Java expression error. public enum Days { Sat = 1, Sun, Mon } …
2
votes
1 answer

Fire an Event with dot42

Im trying my first steps with dot42. I defined a Button like this:
1
vote
0 answers

How to unit test dot42 class library?

I have create an android library in VS. I would like to test it, however my Unit Test project doesnt seem to be quite compatible with it as it shows a yellow warning triangle : In the actual test class I am seeing red squiggles with this…
sprocket12
  • 5,368
  • 18
  • 64
  • 133
1
vote
0 answers

How to link a data source with dot42?

I just started using dot42 as I would like to write some simple android apps in c#. When doing a c# project it is really simple to add and link a SQL database to it. For some reason, it is not as simple with dot42. Am I doing something wrong? There…
1
vote
1 answer

Use MvvmCross with dot42

I'm currently trying some techniques for writing Android programs with C#. I found MvvmCross that is really nice for an old WPF programmer. Sadly, the free Xamarin version does not allow the use of MvvmCross, and licences are far too expensive for…
okrumnow
  • 2,346
  • 23
  • 39
1
2 3 4