How to change values in a compiled apk? - android

I want to create an app in which I want to change some values like some colors which are located in res/values/colors.xml. I want to create a patch file which will be able to modify my app later.
Basically, I am making an app lock where I want to update the lock screen later with different kind of backgrounds and change the colors of buttons and texts.
For example: See CM AppLock. Where the user is able to download the theme from the play store and install it and the lock screen changes as per the theme.

The way CM AppLock does it is called "Android Runtime Resource Overlay", aka RRO. Here is a brief Introduction of RRO. The mainstream Android releases have RRO enabled for preinstalled packages(not allowed for downloadable apks). Last I checked the patches for RRO for downloadable apks are still in review. Android O will most likely have this feature. Here is a brief overview of this new feature coming in Android O.

Related

How to use 'apple system font' in android application

We developed an application in IOS using 'apple-system-font' and we loved this font so we want to use the same font for all TextViews in the android application.
So Is there any way to use 'apple-system-font' in the android application like the following:
<TextView
...
android:fontFamily="-apple-system-font" />
Latest iOS uses 'Helvetica Neue' as system font. You need to download the font file and then add it in your assets. This process is explained in this StackOverflow question.
Note that Apple may choose to change this font over time. Also, even though the font is highly legible and crisp, the users on an Android device may not be used to seeing it. this may result in a 'different' experience for them. Make sure you do proper user testing before adding the feature in production app.

Android: Create different APKs of the same App with different Icons

The companys that use my app want their own icon as the app icon. Since it isn't possible to change the app icon programmatically (or is it?), I need to create multiple apks with different icons.
How could this be done easily (20 different apks) in as few clicks as possible? Is there a tool or something that could do this? or do I need to write my own plugin and if yes, do you have any links on how to do that in eclipse (I've never created a plugin for eclipse before...)
Thanks
Since it isn't possible to change the app icon programmatically (or is it?)
Not really.
How could this be done easily (20 different apks) in as few clicks as possible?
Move your production builds to use Gradle for Android and set up a product flavor for each customer. You will be able to have different versions of the icon, and other stuff if needed (e.g., custom string resources with the customer's name), and Gradle can build custom APKs for each product flavor.

Removing features from android OS

I want to customize the android OS for my specific needs.What i want to do exactly is eg:-
remove the access to android market, remove contacts, calendar.etc.
basically I want to have apps that I permit.
Even if removing the icon is all right.
If you do so you will have create a new custom ROM and only you will be able to install...
Not every one would prefer to install without default features like Market etc..

How to re-build the default "Launcher" application?

My goal is to modify the Launcher application and dynamically modify and change the theme.
I saw several 'home' apps at http://www.cyrket.com/p/android/com.stain46.taghome/. It looks like they took the default Home(Launcher) and modified it. How did they do that? What do I need to modify to achieve the same thing?
I have done this with the ICS launcher. You also need to do quite a number of code changes to get it to compile as a normal app because it uses a lot of private internal APIs (despite what Google may have implied). You also need to change the package name. There are two limitations I've found:
There's a filter called TableMaskFilter that isn't available to normal apps. I think this allows the app drawer to be semi-transparent, but I removed uses of it and it looks fine I think.
More critically, it appears there is no way to replicate the widget-adding experience because it requires a permission that only system apps can have. See this question.
Anyway, I put my source here. It compiles and works on the official Galaxy S2 4.0.3, but if you try to add widgets it will crash.
Note, when you're changing the package name, there are places that Eclipse's refactor doesn't notice (e.g. XML layouts). I recommend you do a global text search/replace instead.
The standard Launcher is open source so you can definitely grab it and modify it the way you want. For your app to be used as the Home Screen you will need to specify the correct Intent filter in your AndroidManifest.xml and the user will have to choose your app when they press the Home button. Why don't you grab that code, play with it and come back when you have more questions and more of an idea of what you want to change.
Here i found one stable version Launcher2
I have sharing that GitHub repo. HERE
WIKI of this project :
This project contains the code for the Launcher app that ships with Android Jelly Bean (API 16).
Some minor changes were required from this source code to remove the use of private APIs. These changes have been marked by "// AOSP Change"

Is this a built in drawable?

In this linked image , I see the button on the right quite often in a lot of apps. On my Moto Droid, it is used extensively in the settings app. It is also used as the default AlertDialog icon. Can I use this via a android.r.drawable?
The icon is built-in with the Android development, you can access the image by using R.drawable.ic_dialog_menu_generic
While it may be possible to use it via android.R.drawable, you may want to find the image in the resources that come with your SDK ($ANDROID_HOME/platforms/$VERSION/data/res, where $ANDROID_HOME is where you have the SDK installed and $VERSION is a relevant Android API level). So, per Mr. Forloney's answer, you'll find that in, say, drawable-hdpi/ic_dialog_menu_generic.png in the aforementioned directory. Then, copy that image into your project. While it will add 5K to your project size, it will mean that the icon does not change based upon OEM or Android changes.

Categories

Resources