drawable-ldpi(120 dpi, Low density screen) - 36px x 36pxdrawable-mdpi(160 dpi, Medium density screen) - 48px x 48pxdrawable-hdpi(240 dpi, High density screen) - 72px x 72pxdrawable-xhdpi(320 dpi, Extra-high density screen) - 96px x 96px
Showing posts with label Android. Show all posts
Showing posts with label Android. Show all posts
Mar 7, 2013
Feb 25, 2013
Android Database
Seems the process to import an Android database isn't as simple as just dropping a SQLite database into your project. If the database doesn't reside in the "/data/data/<project name>/" directory, Android may have issues reading the database correctly. In addition, the primary key column names need to be "_id". Finally, there needs to be a table in the database that has some additional metadata:
What needs to be determined is how this will work in locales outside en_US.
Final thought is in regards to file size. It seems if you don't give the database a specific file extension, Android prior to 2.3 will not decompress assets in your APK if it is larger than 1MB. The 300k word dictionary looks to be about 6MB, so this would fall under that restriction. I'd have to rename it to something like "mp3", so that the android packaging tool will not try to compress it.
Note, copying the database over to the "/data/data" may only be necessary if the database is intended to be written - if the database is read-only, this may not be necessary. I'll need to investigate this further.
Helpful resources:
CREATE TABLE "android_metadata" ("locale" TEXT DEFAULT 'en_US')
INSERT INTO "android_metadata" VALUES ('en_US')
What needs to be determined is how this will work in locales outside en_US.
Final thought is in regards to file size. It seems if you don't give the database a specific file extension, Android prior to 2.3 will not decompress assets in your APK if it is larger than 1MB. The 300k word dictionary looks to be about 6MB, so this would fall under that restriction. I'd have to rename it to something like "mp3", so that the android packaging tool will not try to compress it.
Note, copying the database over to the "/data/data" may only be necessary if the database is intended to be written - if the database is read-only, this may not be necessary. I'll need to investigate this further.
Helpful resources:
- Description of the asset size limit.
- Thread on Stack Overflow on using existing SQLite databases in an Android app.
Feb 22, 2013
A better Android Crash reporting framework?
Haven't had time to dig into the details (the android apps I've published haven't crashed on me), so I cannot say with certainty this is worthwhile. The tool called Android Crash Reporting Application, or ACRA, (grab it on Github here https://github.com/ACRA/acra) does pretty much what the name says. It supposedly offers more details about the crash than what Google will provide by default. It'll post it to a Google Docs document. Not sure about the performance impact (does it wrap all of the code in a huge try/catch statement or does it read from a crash report).
More digging required.
More digging required.
Actionbar Sherlock
Came across this nifty library for Android. This will enable the elegant tab/icon UI present in Jelly Bean on older devices as far back as API v7(Android 2.x - which is over 99% of devices).
As of this posting, only 13% of Android devices are on Jelly Bean - which means dropping in this library to support Android 2.x device will help your app stand out from the pack.
Resources:
As of this posting, only 13% of Android devices are on Jelly Bean - which means dropping in this library to support Android 2.x device will help your app stand out from the pack.
Resources:
- Actionbar Sherlock http://actionbarsherlock.com/
- Android Usage by API Level: http://developer.android.com/about/dashboards/index.html
- Download on Github https://github.com/JakeWharton/ActionBarSherlock
First Post - Getting Started
First post of the new blog. Looks similar to Google Docs. Would like to know how to add a thumbnail - presumably dragging and dropping will work.
Subscribe to:
Posts (Atom)
