Using not compiled media on Android - android

I'm developing an Android application. I'm very new on Android development.
I see on other projects that textures are hold on res directory. They have to be compiled and deployed into device.
I'm wondering if I can download a picture as a texture from a web service and use it.
I don't know if every media that I need has to be compiled.
Thanks.

Yes you could download the pictures from the web and use them. If you plan on having changeable content then you should probably do so as well.
Adding Images to Res will have them included in the APK and, Then copied to the device on installation (Unless you use zipalign which should sometimes allow you to use content from the apk)

Related

Android APK using external data

Hi i am looking into an android development , as we all know when we build the project it makes an APK that is the whole program. but is it possible to make a an android project / APK that would be able to use external files to include more info into the project.
like say for example i have a list commands or functions in my list , but i dont want it to be added into my APK build , is it possible to use it externally?
i was curious because something like COC and other games after downloading it , then downloads extra data from the net , more into updates for the whole game.
how is this possible or is it possible to do , and use functions or source codes externally and not include it into the APK , and also the proper usage of it
Any Android App can connect to the Internet and save downloaded data files to use as they need, without requiring to include them inside the APK. Indeed, for many games (and other Apps having large data sets), it's a sensible option.
There are a couple of things to be aware of:
Android restricts where (on the filesystem) you can save files. And no matter where you save the files, the user can delete them at any
time. Your App should be able to cope with this.
The files should only ever be data files - not executable code. Attempting to
execute downloaded files is likely to put your users at risk
(depending on the permissions your App was installed with) and is also likely to get your App marked as malware.
You should read the Android documentation on Data Storage to learn a bit more about it.

Mutlilingual support for an already build up APK

I am facing a serious issue here. I built an android and iOS application. Now after I developed it completely and it is running seamlessly, I want it to be multilingual(both android and iOS). Is there any simplest method which I can use now to make both my android and iOS apps multilingual now. The .apk and .ipa files have already been prepared and the project is complete. Please help!!!!
You cannot modify your .apk and .ipa files to be multilingual. I mean, theoretically it's possible but it would be ludicrously difficult. If you are stuck with the .apk and .ipa files you have, then your task is extremely difficult, sorry.
You can modify the android and iOS projects (I am assuming they are separate projects) to provide multiple language versions of the resource files where your user text and images are stored, assuming that you correctly stored all text and images which get displayed to the user in resource files/folders.
For Android, see http://developer.android.com/training/basics/supporting-devices/languages.html
For IOS, see http://www.raywenderlich.com/64401/internationalization-tutorial-for-ios-2014.

Where we put language files of tesseract ocr engine in an android app?

I'm programming an application in android which uses OCR. I'm using the tesseract ocr and I want to ask where should I put the language files in my project, so that when I install my app in my phone(Samsung Galaxy S) the files be somewhere for the app to use them for the ocr process. I think that it should be in a place like: /mnt/sdcard/tesseract/tessdata, but how this can be done without putting them myself in my device and let the installation to do this.
You'll have to include the files with your project in the assets folder.
See AssetManager to learn how to access your files from your activity. Also I would suggest that you don't copy them to the SDCard. Unfortunately since your files are going to have to be included with your project, and thus will be present in your apk file you're going to end up with a larger application size. But also unfortunately I don't believe that there is a way to delete the files from your apk at runtime, so even if you copy them over to the SD your app is still going to be the same size. For that reason I see no reason to copy them to the SD card, just access them from the AssetManager when you need to get them. Doing it that way also means that your application will not break if the SD card is removed / unmounted.
Simply put them under Assets in a "tessdata" folder. That is in your project.
You can use Xamarin and the Tesseract for Xamarin nuget package, they're really easy to use, just bear in mind that you probably will have to install older version of the nugget if the latest version doesn't work. (2.10 was the working one as far as i remember)

Android - Add more levels to game without the need to download or update a new app from the Market

I'm working on a platform=app for games and I want the user to be able to choose games like some kind of an add on, then it will download some file (a game) which my app knows how to read and work with.
Basically, what I want is to build a market without apk files.
Or to generate a new kind of apk files.
I hope you can understand my question..
The way I do it is to simply send a level to the client using the network connection.
My maps look like: [[0,1,2],[0,-1-1]...] which can be nicely compressed.
Even a big level doesn't take more than a few seconds to download.
You just need to generate your own 'level' code reader.
the way snesdroid works is it will play emulator files on the sd card, not sure if you could code the app to download files directly to the sdcard in a specific folder then have the app rescan that directory to refresh the levels.

Include a database file with Android application via Eclipse

How can I instruct Eclipse to copy a file from my Android solution to an emulator, as part of Run/Debug? I have a small database, stored in Assets, that needs to accompany the application. Thus far I have simply copied the file myself using DDMS but would prefer to have it automatically included. The project properties allow me to specify some aspects of the build, e.g. the build order and which libraries should be included, but I don't see anything about simply copying a file.
Is the file in your "res/assets" folder not available using the AssetManager class during testing versus during testing or when installed via a signed apk?
I use a large file that I store in "res/raw" in one of my games, I am able to access this file during testing with eclipse without a problem just using the normal calls to context.getResources().openRawResource()
Deploying databases with your application it a reoccurring topic over in the android-developers Google group here is a post with a few thoughts on the matter.
Good luck.

Categories

Resources