How can I Access an already existing SQLite database in mono for android

I'm currently working on a project where the application I'm creating needs to include a database. I've got no problems so far creating my own SQLite database from my application and accessing it is not a problem either. The problem for me is accessing an already existing database that I've included in the assets of the application.

I've seen many examples of solutions online where this is done by copying the database to the /files folder and then used something called SQLiteOpenHelper, which seems like a good solution. However, they've all been using Java so far and since I'm using C# (developing in Xamarin-studio which uses Xamarin.Android a.k.a. mono for android) those solutions doesn't really work for me.

Could anyone please give me som instructions about how to do this in mono? Or if you now other ways to solve the problem show me how to do those?

Thank you in advance

Answers


Have you tried following the Java guides on Xamarin?.

I had a lot of Android/Java experience before starting with Xamarin, and what I've found is that all of the android platform classes and fields are present in Xamarin (with some modifications to include C# naming conventions like camel case, enums, etc). So try following the guides from Java on your Xamarin project and if you hit a problem ask here or at http://forums.xamarin.com/


Need Your Help

Entity Framework - Get all records using tableName

frameworks entity

I am trying to create a generic "table editor" using Entity Framework.

Navigation Drawer Below Transparent Actionbar

android android-actionbar transparency navigation-drawer titlebar

I'm getting a transparent Actionbar by using the following code that @GunnarKarlsson shows here: Transparent Actionbar: custom tabcolor

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.