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
1
vote
0 answers

Expected chunk of type 0x180, read 0x100

I am trying to use the ksaop2-android library with Dot42 and after getting to a point where I thought I could test, I get the above error after a successful build. I am starting in debug mode. I have never seen this kind of error before and have…
1
vote
1 answer

Using native C libraries in dot42

Is it possible to use a native C/C++ library with dot42? If so are there examples of how to do this? If not is this a planned feature?
user633077
  • 231
  • 1
  • 2
  • 12
1
vote
0 answers

Using SQLite with dot42

Is it possible to use ADO.NET to access SQLite Databases on android using dot42? I know there are C# wrappers for the underlying library: SQLite.NET Any ideas?
user633077
  • 231
  • 1
  • 2
  • 12
1
vote
0 answers

How to make a SOAP call with dot42?

I have the following code. I know that the webrequests and such should be in async calls but I just wanted proof of concept. using System; using Android.App; using Android.Os; using Android.Widget; using Dot42; using Dot42.Manifest; using…
1
vote
2 answers

Is there a dot42 equivalent to System.Net.Sockets.UdpClient?

First off, I am new to Android and dot42. I have built a UDP Listener class, which is working fine in a Windows application. I am using the System.Net.Sockets.UdpClient class. Now, I have tried to use my UDP Listener class in a dot42 project, but I…
Flo
  • 219
  • 2
  • 10
1
vote
0 answers

Requesting administrator rights within android using dot42

Code so far: [Activity(Label="@string/activity_sample_device_admin")] [Receiver(Enabled = true, Permission = "android.permission.BIND_DEVICE_ADMIN")] [MetaData(Resource = "@xml/my_admin")] [IntentFilter(Actions = new[] { …
Keiper
  • 11
  • 2
1
vote
1 answer

On every button click data is added to listview but in an unexpected manner . Data is repeated in the listview

[Activity] public class MainActivity : Activity { public string[] items = new string[100]; // string to store data from editText int i =0; ArrayAdapter adapter; protected override void OnCreate(Bundle savedInstance) { …
desolator
  • 27
  • 5
1
vote
1 answer

This code is no working and error is shown at compilation?

using System; using Android.App; using Android.Os; using Android.Widget; using Dot42; using Dot42.Manifest; using…
1
vote
0 answers

Cannot create file in databases folder

I am trying to copy a ready made sqlite v3 database from my assets folder into the /databases folder of my app. But I get a java runtime exception. private const string DB_PATH = "/data/com.MyApp/databases/dbname"; public SQLiteDatabase…
sprocket12
  • 5,368
  • 18
  • 64
  • 133
1
vote
1 answer

Dot42 - How to populate preference fragment from a resource?

While using Dot42 it appears that I can access AddPreferencesFromResource(int) of PreferenceActivity class but the resource that gets passed to this method is not available to me. I expected the call to look like…
1
vote
1 answer

dot42/xamarin Android programming and applying AlertDialog's SetOnCancelListener method

I try to 'develop' an Android application with C# (VS2010 + dot42/mono) which shows lots od messages, gets users' input, and creates AlertDialogs. The questions are: 1. Do you know how to catch OnCancel Event returned from Android…
TomeeNS
  • 455
  • 4
  • 10
1
vote
1 answer

dot42 - http POST request with parameters

I try to send POST request with parameters with this code: var uri = new Uri("http://127.0.0.1:81/login/login"); var client = new DefaultHttpClient(); var par = new BasicHttpParams(); par.SetParameter("username", "admin") …
NikRo
  • 31
  • 5
1
vote
1 answer

Using AndEngine in dot42 project: compilation errors

I'm using dot42 to develop simple 2D game in C# and target Android market. Game is pretty simple so I can manage to make things work on my own but since AndEngine seems to have already implemented all features I will need (pinch zoom, panning,…
grapkulec
  • 1,022
  • 13
  • 28
1
vote
1 answer

dot42: exception thrown when calling SoundPool.Load method for raw resource (mp3 file)

I added Beep.mp3 file to my project and set its type to RawResource. After build I can see id generated in R.Raws.Beep so I assume all is good. But when I try to use that resource and load sound into SoundPool instance I get an exception with a…
grapkulec
  • 1,022
  • 13
  • 28
1
vote
1 answer

Visual Studio 2012 Unable to Create dot42 Project

After running through the installation of dot42, and specifying both Visual Studio 2010 integration as well as Visual Studio 2012 integration, I'm unable to find a 'dot42' project in 2012. In 2010 the new dot42 subcategory opens under C# and I'm…
brazilianldsjaguar
  • 1,409
  • 1
  • 20
  • 45