What is the best way to use an mbtiles database with google's TileProvider?
I've been told that tiles as files are difficult to manage so i'm trying to use the mbtiles directly.
Take a look here:
https://github.com/cocoahero/android-gmaps-addons/blob/master/src/com/cocoahero/android/gmaps/addons/mapbox/MapBoxOfflineTileProvider.java
That class will do it for you.
I hope you can use it.
Related
I am not sure if anyone has ever tried this. I am currently storing attributes in a sqlite database on android. What I want to do next is to retrieve these data and apply Machine learning algorithms implemented by Weka. Weka can indeed take data from databases using JDBC. But can this be done with android? The SQLite database in android doesn't seem to be a normal SQLite databse.
I have read this http://weka.wikispaces.com/How+do+I+connect+to+a+database%3F, but it doesn;t help much.
Thank you
I do not think there is a ready implementation for Weka to read the data from sqlite on Android, because the helper class mainly depend on JDBC which is not available for android.
I can think of two options to achieve this:
Query the sqlite database on Android and create Weka training instances programatically on the fly. This solution might be more suitable for online training and when you have large dataset.
Export the training data from sqlite as csv file and pass the file to Weka for training.
It seems that WEKA won't work on Android without changes. J48, for example, requires the java.lang.Cloneable interface, which is not available in Android.
This is a weka port to android project here.
Hope it will help you.
What is the best/easiest way to store a list (LinkedList) of a class which I created in an Android application?
In apps in other plattform it could be done using:
a ORM framework
the database
serilization and store the file
But my question is: Which of those 3 is the easiest to implement it in an Android application without using a lot of time to make this code?
Using directly SQLite in my opinion is the easiest and most straightforward way to do it. I would consider an ORM-Framework only if I have a lot of classes to store. But I am assuming that's not your case.
Straight serialization to a file might be a good idea, but I would prefer SQLite to have the possibility of using database versions, adding indexes and performing more complex search on the data easily.
It depends on how you inted to use this data. Simplest way is inherit you class from Serializable and dump LinkedList to a file. This works great if you don't need random access to elements of this list.
SQLite is good and flexible but it requires much more coding effort.
I want to add a SQLite tile provider to OSMDroid just like RMaps. I went through OSMDroid source code and its tile providers and I found that they are designed to get tiles from File, Archive file and internet.
I am using osmdroid-android 3.0.5.
I don't belive this is possible with the current Osmdroid library. If you want to do it you will have to create your own TileProvider to fit into the framework which should be possible.
I expect that using an archive file for the actual map tiles and a seperate database for your meta data is by far the simplest solution. Putting large amounts of data like the tiles into the database is not recomended.
Have a look at this page. I think this is what you are looking for :o)
I recently implemented a sqlite storage for the tiles of the osmdroid lib, and the only thing missing is the ability to create it with mobac. So I wrote this patch to provide the new output option. Please have a look and commit it if you like it. Let me know if you think I should change something.
I wanted to ecrypt the db file that i am storing on the sdcard. I have looked into SqliteCrypt library for serving my purpose but its using C libraries to perform the encryption/decryption.
I would like to know if anyone has successfully included the library in their project? If yes, please guide me through the process. Any guidance or any samples will be of great help.
Edit : Anyway, it's much more simpler to implement encryption yourself based on plain Java. It's not difficult – #barmaley
I want to encrypt the whole db file as single unit. Not individual data fields. Please let me know if there is any alnerate mechanism to achieve this.
Try using SQLCipher for Android.
try to use SqlcryptSDK
it is my project, i use android source code and add encrypt method in it.finally build the sdk and demo;
In android application for data storing and sharing in app which one is good and why ?
Is it SQLite,Shared Preferecne or File IO
SQLite is a database and provide the advantage that you need to get from the database.Shared Preference can stores some values as string,long,int,boolean...You can use this if you need to store some unstructured data that actually not related to each other.On the other hand file has its traditional features.I think it depends on what kind of data you want to store and for what purpose and also What is the relationship between your data.You have to choose according to your situation and needs.
I think that depends on your use, you can refer to the developer document,
http://developer.android.com/guide/topics/data/data-storage.html, hope this will help you
They are all good for different reasons. Read this comprehensive overview of all the options.