Where to put arcgis map after installing the app on devices - android

I have create an app , it is location based app. The map is created by us and we want to protect it , so I want to put the map somewhere that no one can get it , I thought about the
assets folder , but I can not get the file read from there,
I can read the map file like this
ArcGISLocalTiledLayer localTiledLayer = new ArcGISLocalTiledLayer("the map.tk");
which this way does not work for assets folder even with absolute path.
So is there any other options? or even assets folder (which is read only)?
because I couldn't get anything anywhere

Related

Recommended locations to store app licence file and database?

Where would the recommended location be to store an app licence file and a SQLite database for Android? Also, what are the constants used to point to those locations?
Note that the location(s) must be accessible without having to root the device, so the app data folder is not an option. I need to be able to access the files via a PC using a standard file manager.
I noticed that on the root folder of the device, there is a folder called "db" where other apps seem to store data. Is that a good location to store my db? If so, what is the Environment constant that points to it?
Depending on the level of security you want to achieve, there are numerous approaches to this issue.
At it's simplest you could store them at any folder on you external storage(Documents,Downloads e.t.c) or on your SD card provided that the user has given you permission AND has himself selected the path since newer Android Versions have reworked(restricted) the way an app can read/write from/to an SD card.
If for example you want to store it to "documents" folder you could do the following:
File file = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS),".dir");
This selects the "Documents" folder and creates a folder called dir. Note the "." before "dir" , meaning that the folder will be invisible as a first level of security. From here on you can create any number of directories or files you desire.

Create folder inside android folder of android device

We all know there is always a folder in android named Android which always contains data of app.
I saw many app folder inside it which store their file there.
So my question is how can i create a folder inside android folder of an android device and store my application data inside of it?
Please suggest something
We all know there is always a folder in android named Android which always contains data of app
I am assuming that you are referring to the Android/ directory seen in what the Android SDK refers to as external storage.
how can i create a folder inside android folder of an android device and store my application data inside of it?
Use getExternalFilesDir(), getExternalCacheDir(), or getExternalMediaDir(), all methods available on implementations of Context, such as Activity and Service.
Also, if you want to be able to see the files that you create from your desktop OS, you will need to arrange to have the files indexed by the MediaStore.

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/

How to attach .db file with another .apk android

i am making dictionary and i have so much data to load. I want that i create a project which first load the dictionary words in database and the after i use this .db file in my 2nd project which is dictionary project.
But i don't know how to get the .db file and copy it and paste it into my assets folder.
Well, yopu cant simply copy any files from one private storage, to another. I suppose you can archive this using different ways, for example:
1) Copy your .db file to SD card by first app, and copy it back to private storage by the second app.
2) You can use ContentProvider to share private data between 2 different applications without moving it on SD card.
You can'not get direct access to assest or any other data folder of different application. Good luck!
You can get resources from other package with PackageManager.getResourcesForApplication() method. Also you can share user id between your apps and sign them with share sertificate. In this case you can even share code base. +#Evos' suggestions.
I think share user id is your choise.
You can find examples and more info in this post and here.
Open Your previous project them open DDMS tab ,then go on path
data--->data---->your project---->databases--->.db file
now select that file and click on top right corner of screen here is a buuton to pull file from device to PC so click on that now a file dialog will appear select location to save file , now ok....this action will save your .db file on your selected location
now you can copy this file and put this file in your new projects assets folder and then use it.

Load External Text File Into Android App Without Using Resources

I have an android application I am developing in Java.
I need it to load a text file so it can read what is in the text file and get values from it.
However, everything I have read so far has been directing me to use resources and package it up with the application.
However this means if I want to change the text file, I have to reinstall the application, which is not what I want.
I need to end up with the .apk file and the .txt file in the same folder on my android phone so I can change the .txt file and the app reads in the text file in its directory.
Can anyone help?
No, you do not want to end up with the .apk and the .txt file in the same folder.
You want to end up with the .txt in some place that's always the same and that you know about.
You can deploy the initial .txt via the ressources (aka: package it and copy it to the sd for example) and later download a new version (or copy something to the device via usb).
Then inside your app check if the file exists and open it with standard Java. There's plenty of source around for that.

Categories

Resources