Using raw folder in android - android

I am trying to access a file placed in raw folder. I am able to read the contents of a text file but I need to access a word(.docx) file with all the text formatting applied to it.
How can I achieve it? Please someone help me!

There is one way to display the docs file in Android using 3rd party libraries.
However, JasonPluText has created a demo showing AndroidDocxToHTML
See this question for more details: how to Show or Read docx file

Related

How to create Maps.Me .mwm file extension?

I want to know what is .mwm file extension, how can create this file type for using in Maps.Me android application?
I want to use Maps. Me API and create map application that will work offline, I saw in storage that application download maps to directory as .mwm file, and this file little, compact file that whole map comes from this file. I want create this file type but dont know the structure of this file. How can I reach this? Thank you for patience. All suggests are acceptable
.mwm file is nothing but the downloaded map file of an particular area from the maps.me also you can get the map using this link http://direct.mapswithme.com/direct/latest/

Cordova/Phonegap - Where do I put a data file I want to read?

I've been driving myself crazy trying to find the answer to a seemingly easy question.
I am trying to create my first app using Cordova. I want to bundle a text file with my app that can be read when the app starts up.
Where do I put this file?
dataDirectory seems like a good place, but where is it? Documentation says /data/data/<app-id>/files but where are those data directories? Do I create them?
Update 1: Ok, I think I've figured out that dataDirectory should be pretty much just where the path says it should be, at the root of the file system. But the directory doesn't appear to be created automatically and I don't know how to package a file - a JSON file, for instance - and place it in that directory.
Essentially you do not need to create these directories. Those are created once your app is installed by the Android itself.
A typical way to get this done would be that you could first off add those files in your app's assets directory and then at runtime you can copy those file wherever you want.
There is a repository on Githup which provide a similar functionality.

Vuforia - Getting Started in Android

Android 2.3.3
I am new to Vuforia and Augmented Reality in particular. So, please excuse me if this is very basic question.
I was able to download and run the sample application from Vuforia on Text Recognition and Image Recognition. Now I set out to create a sample application(Image Targeting) of my own.
Here is what I did ::: Following the steps given in Vuforia
Downloaded the SDK from Vuforia.
Created a Database using Target Manager in the developer console of Vuforia.
Adding a Target - I uploaded an image into the database that i just created. It's an image of letter A.
Updating Targets - skipped this step
Downloading Targets - Selected the image and clicked "Download selected targets" and got a zip file in my system. I extracted it and now i see two files, one is a .dat and another is a .xml file.
Now I have no clue of what to do, from here...
Here is what I wanted to do.. When I scan the Image A with my application, it should show, you have scanned A. That's it - As simple as that.
Can someone tell me what I need to do from here..
I tried searching for tutorials on Android part of vuforia, but I really didn't get any help from web. Please guide me incase you have some links with you.
Thanks in advance!!
Thanks for your quick response Sushil
Edit 1 ::: Okie, I see them in the Assets folder. I will add them in the Assets folder too. Now, can I change the files in the sample application, with my files(that I downloaded) and change the references, to make the sample application work for my files? Is it that simple?
You need to keep those two target image files (.dat and .xml in the assets folder) and then use them in the code.
Check the sample application. You will see .xml and .dat files inside the assets folder

Data in XML: where to place it

I am trying to design a new Android application.
For that application I will have an XML file that will be located somewhere on the server. This file will be generated from the mySQL DB.
For now (developmental phase) I got a simple and small XML file that I need to put in the Android Eclipse project in order to read it and present the data on the phone.
I just tried to put this file in res/values, but compiler gives me an error: "Invalid start tag".
Looking through the stackoverflow and google I see a lot of different answers and google even give me an answer of how to parse xml file on Android. ;-)
So is there a "standard" place where such XML file goes in Android Eclipse project? Think about it as the data that is read from the DB.
Some answers are to place it in the res/xml folder. I just made a brand new Android project and I don't see such folder in it. Do I create one? Shouldn't it be done automatically?
Some says you need to put it the res/raw folder. Again it is not present in the Eclipse project. Do I make one? Shouldn't it be present already?
Please clarify.
Shouldn't it be present already?
It doesn't have to. There can be thousands of folders inside res/ folder. You don't want to have them all at first.
Do I make one?
Yes. Add folders when you need them.
Some answers are to place it in the res/xml folder.
Some says you need to put it the res/raw folder.
The difference between these folders is that files inside raw stay the same you put them and inside xml are parsed when APK is created and put there in a binary, optimized form, similar to what happens to layouts, AndroidManifest and other.

how to use android_asset

I try to make Webview from to display application/x-shockwave-flash embed element in my app, but i have blank gray screen on emulator and white on device. There are many topics about this problem but any1 really solved.
I explore log of simillar app and see: file//android_asset/index.html. So question... this static file or i can get it from web or modify it.
I trying get my data video.loadDataWithBaseURL() from web, but can i have that data from local storage?
Maybe I said something wron but it's look for me like 'convert web data to local'?? Can some one help my in my problem or explain in this question.
Thank you.
file://android_asset/ is a way that allows android apps access assets by a network-based URI. But assets represent neither local nor online files, they are packed into your apk. Put any files in assets folder in a android project and they will be packed into the apk file by the builder.

Categories

Resources