Does the android application may allow another app to modify own files? - android

I am wondering about new skinning mechanism for my app. However I don't want to make my application bigger.
Is it possible to create another app, which will be able add/change files of another my app in /data/data/com.myfirstapp directory ?

You could set up aContentProvider that other apps could use to transfer data to your app, which could then save it to its own data directory.

The answer is simply no, you can access other applications from your own application but you cannot edit or change them.

Related

persistent preferences in android

I want to create a preference set which the user will not easily be able to delete/clean...
the idea i got is to create the persistence files in the public folder as and hidden folder (this way the files wont be deleted on unnistall or if the user asks for clean apps data)
my questions:
1- does anyone knows a better way? is it possible to do that using the apps private folder and somehow tag the files for no deletion?
2- is possible to use native android preferences framework and specify another file to store the properties? how?
3- does anyone know a good, SMALL and simple to use API for persistent properties similar to androids default?

is it possible to create a Android application that can replace other applications text

I wanted to know if it is possible to create
a Android application, when it is running (in background) it replaces if text for example:
"(smiley)" => ":)"
it should work for all other applications
If yes, then how?
I've tried to create custom symbols via SoftKeyboard, but that is not what i want.
Thank you.
One app cannot directly change the contents of another app's UI.
An input method editor (IME, a.k.a., "soft keyboard") may be able to help the user create emoticons and the like, but the user has to opt into using it.

Providing themes as an add-on (additional download, image sets) for an app

I've got an Android app that can be themed using a set of images. It lets users select which style of images to use, but in order to keep the main app small and let users download/manage only the additional image sets that they would use I want to offer add-on downloads (like extensions).
What's the best way to do this? Thanks in advance.
Well, Handcent, a mms app that I use, had all their themes on the market. What I guess they did is just keep the file structure the same and when the user downloaded the apk data folder, it was placed into the already existing apk tree of the primary Handcent application. I have no idea if that's how they did it, but I can't see why it wouldn't be feasible.

Configuration file in Android. Does that exist?

I have some configuration I want to save it in my Android application and read it whenever I need , for instance, the server URL that it should try to access like that.
Is there any similar mechanism like web.config in ASP.NET available in Android?
A central configuration file that can be set up manually and then read by the application? Any help would be appreciated!
We use a .properties file in assets folder. It works out very well for us as we support multiple carriers with this, write to it (in case some values, sent from server, need to change. This is done at app start time, thus making our code configurable from server).
You can throw things like that into your strings.xml file. But, since you can't actually modify these values in real-time (since it's a distributed application rather than running on a server), throwing it into a constants class is quite acceptable.
Use Shared Preferences.
Here's a link Shared Preferences
You can use sq lite database files for it. You have a native API to read and write those and on top of that a command line tool.
If you want to create an XML file instead, then it's no different than any other xml file (unless you are thinking about the Shared Preferences, which use an xml format to save the data, but I believe it's not the best API for your application).
I was stumped on this too, but came across Managed Configurations in the Android documentation.
Managed configurations, previously known as application restrictions, allow the enterprise administrator to remotely specify settings for apps. This capability is particularly useful for enterprise-approved apps deployed to a managed profile.
It allows you to set a default value in case you rather not getting into the enterprise admistration business but leaves that option open for the future.
There is a caveat. This only works if your app is registered for EMM. Otherwise you will retrieve an empty map of restrictions.

How to change standard resources on phone/emulator

I'm a new in Android and Java and I have the following problem. I want to change standard resources, such as button background, programatically to allow applications using standard buttons be displayed with custom background. My problem is - how shall I identify the path for retrieval resources on phone or emulator? And if we have permissions to access to those resources?
The only way you can change "standard resources" for the entire device is to modify and install your own firmware.

Categories

Resources