create an android apk that only update a resource image file - android

Is it possible to create an .apk file that only update an image in the existing app? my app is an in-house app for corporation, not in the play store, mainly contain of images (in the resource folder), and i just want to create a patch (an apk that is significant smaller size) that only update one of the images in the existing version.

If you want your app change image in the res folder of another app it may be possible(not sure it can be impossible at all) for rooted devices.Because all app folders created by the android system for the installed application are protected and can not be accessible for another processes.
But if the image was created on SD-card or on the shared device memory it is not a problem.

Related

Where application icons are stored in an Android device?

Just out of curiosity, I wanted to know where on the file system of an Android device the application icons are stored.
Like I have shortcuts to various applications on the homescreen of my device, where those icons files (or images) are stored. Is it only inside the application package (.apk) or Android stores it some where else?
If it is in application package only does Android loads all the imagess from each of the apk and loads it when it is started for the first time?
When an app file is installed, the .apk file is analyzed and various items of information are extracted by the launcher. (This process does not involve loading and running the app itself.) Among these items is the app icon, which the launcher typically caches in its own private area. Exactly how this is done depends on the launcher currently active on your device. You might be able to browse through the source for your launcher to find out more details about how it caches these items extracted from the app .apk files, but I'm not sure what practical use there would be to that exercise.
The launcher's use of its own cache greatly speeds up start-up, as otherwise every installed app would have to be scanned at every reboot to extract the requisite information for the launcher to show itself. However, the cache is the source of occasional problems, such as the icon not updating right away when an updated app (with a new icon and possibly a new app name) is installed. (See, for example, this thread and this one.)
Think about what happens when you create your own app. Typically, you create icons for your app for all drawable resource buckets (or at least the ones you want to support). Then these files get packaged with AAPT into the apk with the rest of your project. Then after installing your app, the OS will pick the icon that matches your phone configuration and create a shortcut on your installed apps page.

How to update my game made with Unity running on Android?

My game have 100M asset bundles, I put the budle files into the StreamingAssets folder(I want to release my apk as one whole app, not the downloading when playing style), then I built my project into one apk file, then I installed the apk file to my device.
But how can I update my bundles when my game find one new update is available? The StreamingAssets folder on Android is read-only.
One solution is that: copy the bundles in the StreamingAssets folder to somewhere like the Android's External Storage, then use bundles in the External Storage. But this will increase my game size from 100M bundles to 200M.
So on Android when I install one apk, can I install some files meanwhile into somewhere writable?
Anyone can help me? Thanks.
Not sure if I understood: you shouldn't use asset bundles if you are not, at some point, going to update them or have new assets to download in-game.
So just use regular prefabs and use the regular Android update process to update the application.
But if you want to have asset updates in-game then you use asset bundles, put them on StreamingAssets and use WWW.LoadFromCacheOrDownload(string url, int version) to load them; when a new version of your asset is available you change the version in that call and it will just download and cache the new version.

Confusion over apk resource files and internal/external files in Android

I am writing an app that has a HorizontalSrollView composed of a LinearLayout that is composed of ImageViews.
I have default images for the HorizontalScrollView in the res/drawable folder. These images should check against a list of images on a server somewhere and if the files are different, the new ones should download and other files that doesn't exist on the file but on the device should be removed.
All that works, except for during my debugging process I have a question. Every time I click "run" on eclipse, does the internal and external storage of my app get removed clean or do the files stay there even if I am installing a newer "version" of my app?

How to package wallpapers into an apk?

I don't have any programming knowledge, but I have installed Eclipse, and android SDK. I want to package some wallpapers into an apk and publish them in the android market. Can someone show me a tutorial or explain how to do it?
Thanks
Files placed in your res folder when you build your application are placed inside the apk.
Though they will not be avaliable for external use other than your own application. Aka, you will not be able select them via the built in wallpaper picker options.
You would have to have the apk copy the resource files to the SDCard when it is run.
Actually here is another question asking the same thing:
How to put a wallpaper inside an apk file?
Its relatively straight forward but requires some basic android and programming skills.
Store all your wallpapers in your res folder (apk).
WHen the application launches, one by one, save the resource file to the SDCard. (Check if they already exist first).
The user can now navigate his/her photos and see your wallpapers. - And hence able to set them as wallpapers.
If you don't have any programming knowledge, it doesn't matter. Here is an android wallpaper app example code, you can easily replace your image url (which should be on internet) inside.
Android Wallpaper App Tutorial (1-4)

Using not compiled media on 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)

Categories

Resources