Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by rambramdt · Jul 05, 2011 at 06:22 PM · androidpluginsqlite

Sqlite plugin for Android

Hello,

I am trying to get sqlite working on Android. I have a Mobile license for Android and I am developing on a Macbook Pro. Here is my plan of attack:

  1. Download sqlite from sqlite.org;

  2. Compile sqlite.so and copy it into Plugins/Android

  3. Wrap around sqlite.so with C#

  4. Use it in Javascript or C# elsewhere in my application

The only problem is I am self trained in computer and compiling is not exactly my strong point. I once compiled a shared library using Android NDK and thought this would be similar. Not at all. And the plugin example from Unity site (the one with the texture) came with the DLL already made so it doesn't help.

Could someone post a detailed direction on how to accomplish this. Or, if you have a better solution, please do share.

Jason

Comment
Add comment · Show 7
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image rambramdt · Jul 10, 2011 at 04:28 PM 0
Share

All right. I found a libsqlite.so and extracted it from my Droid phone using ADB. So, now I do not have to cross compile, thank God!

However, if there is already a libsqlite.so in the phone, why doesn't SQLite work? I tried to adjust the Android API level and the .NET compatibility in the player settings. Didn't help.

I know I am getting closer, but if somebody could help, I'll appreciate it deeply.

Jason

avatar image Rustam-Ganeyev · Jul 19, 2011 at 03:06 PM 0
Share

You could get the same result, just adding System.Data.dll and $$anonymous$$ono.Data.Sqlite.dll to Assets/Plugins folder. The problem you have is your droid didn't find sqlite3.dll. I have the same problem and I don't know how to deal with it.

avatar image HashbangGames · Aug 24, 2011 at 06:06 PM 0
Share

bump

I have the exact same issue, and I have been unable to get around it. Please someone help us! it cannot be this hard to implement a sqlite database, Also, how will this effect us if we are developing for android & IOS?

please someone help.

avatar image n0mad · Sep 05, 2011 at 10:10 AM 0
Share

Bump, same problem here ... sqlite3.dll won't be integrated into the Android build, for whatever reason. So how are we supposed to use Sqlite for Android ? (re$$anonymous$$der : Android natively supports Sqlite, so it should be a supported feature) Bug reported under case 417539)

avatar image rambramdt · Sep 09, 2011 at 01:19 PM 0
Share

Update:

This is a $$anonymous$$onoDroid issue. Contact them to get it fixed. In the mean time, consider Siaqodb. It is an object database with Unity support, reasonably priced. Their technical support has been highly responsive and helpful.

Jason

Show more comments

4 Replies

· Add your reply
  • Sort: 
avatar image
-1

Answer by digitalroar · Apr 13, 2012 at 02:31 AM

I wish to hell I could down vote this answer. definitely not helpful in the least.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by rambramdt · Jul 15, 2011 at 09:40 PM

OK, correct me if I am wrong. Mono allows linux-based systems to run dll files?

I am following the example from http://www.unifycommunity.com/wiki/index.php?title=SQLite It works in the editor and on Mac standalone, but it does not work for Android.

After unzipping the apk file, I see a Mono.Data.Sqlite.dll file under the Managed/ folder. When I tried to create a database through my app on a Droid, I got the following error from ddms:

07-15 13:27:33.550: INFO/Unity(31157): DllNotFoundException: sqlite3 07-15 13:27:33.550: INFO/Unity(31157): at (wrapper managed-to-native) Mono.Data.Sqlite.UnsafeNativeMethods:sqlite3_open_ v2 (byte[],intptr&,int,intptr) 07-15 13:27:33.550: INFO/Unity(31157): at Mono.Data.Sqlite.SQLite3.Open (System.String strFilename, SQLiteOpenFlagsEnum flags, Int32 maxPoolSize, Boolean usePool) [0x00000] in :0 07-15 13:27:33.550: INFO/Unity(31157): at Mono.Data.Sqlite.SqliteConnection.Open () [0x00000] in :0

Could anyone tell me what is going on?

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Bunny83 · Mar 26, 2012 at 12:00 PM 0
Share

@rambramdt: No. $$anonymous$$ono doesn't allow you to run native windows dll files on linux. However pure managed code libraries (also the extension .dll) will run with $$anonymous$$ono on any supported platform.

The $$anonymous$$ono.Data.Sqlite.dll is a mixedmode .NET assembly. While it is a managed code library it's just a wrapper to the native code dll SQLite3.dll

You might want to try this 100% managed code port of sqlite

avatar image Oksana Iashchuk · Sep 11, 2012 at 03:56 AM 0
Share

I think you have to look at http://u3d.as/content/orange-tree/sqlite-kit/3ka

avatar image
0

Answer by n0mad · Sep 12, 2011 at 11:47 AM

Some forum user kindly posted a Shared Object Library version of the sqlite3.dll, so it can work on Android. Here : http://forum.unity3d.com/threads/97043-Sqlite-for-Android-help-please?p=686204#13

Solved everything for me.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Oksana Iashchuk · Sep 10, 2012 at 07:13 PM

Please, check this -> http://u3d.as/content/orange-tree/sqlite-kit/3ka That is 100% managed code, full SQLite3 support, all platforms. No native dependencies.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

8 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

SqlLite , android and unity 1 Answer

Sqlite4Unity3d difficulties 1 Answer

Launch of external activity from a unity freezes 0 Answers

Android Unity Plugin problem 0 Answers

Turn your Android device webcam (Camera) , flash light 3 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges