I developed an application and I want to create an update package which contains string.xml and styles.xml but no activity (just updated files, not the whole app package), Actually I tried this with same package name but it didn't work, Does android allow me to overwrite these files after installation? How can I do this?
Thanks a lot ...
The only way you can do that is by updating the existing code with the new styles and strings and updating the application from the distribution means that you have chosen.
Just food for thought :
If you have an application which have a constant change in the strings and styles, then perhaps you can create a dynamic application which fetches these settings from some server and applies these changes on runtime. It entirely depends what is the nature of your application.
Related
I am very new for developing the multi-language oriented Android APP. This is the first time i am going to support my app in multi-support language app. I need some clarification for developing the multi-language support app. Already i have some ideas before initiate the development.
Single APK with Localization like will make the multiple String.xml and include it in inside of the app and based the member selection of language its automatically invokes and works.
All language strings values will retain in app server (back-end) and will raise the Rest-API request and get those values and change it inside of the entire app (all screens) if member click and change the language inside of the app.
Main concern is if anything needs to change in future then Idea2 is best way. We will just change in back-end side it will be appeared in client side. But if we are going Idea1 and wants to change then we need to put the new build only.
Which one is best approach and recommended way to develop?
You will need to create different String.xml depending the languages you want to target as JDenais says, in my app i have the following
for example the first arab string consist in the same as Strings.xml but with all in arab, now, you only need to call one string in your xml files and it will just select where to grab depending on the phone language. Or in default the language from where the app was downloaded by google play, in fact, they are all the same strings.xml , so you dont need to specify which one you want to pull the translated text from, just replicate your main strings.xml in your other strings.xml and then the phone will decide where to pull the data.
Also please read the official doc on how to accomplish this https://developer.android.com/training/basics/supporting-devices/languages
Also please check the language ISO Codes here
What is the list of supported languages/locales on Android?
All your texts should be packaged in the APK in different String.xml files. Forget about receiving texts from a backend. It would be a lot of extra work for limited gain and with added risks of failure.
The framework takes care of selecting the appropriate string.xml file and offers support for needed use cases like plurals.
right click the values folder and choose new-> values resource file -> locale -> choose the language you want and name it strings.
copy the strings from the original string file to the new file and change them to the new language just the strings
make sure that the view xml files have their text set as "#string/the_name of the string" not hard coded
We purchased the source code to a certain Android and iOS application and now need to re-brand it before releasing it on the app stores. I'm quite familiar with Android, so that side wasn't an issue. However, I've never touched iOS apps before, so I have a few questions.
On the Android side, we changed the application name by changing several string resources. Then we changed the package name in the manifest.xml file (to make this a unique application in the eyes of Google Play) along with changing the package names in the affected class files. And compile.
Would iOS applications require something similar? Is there an equivalent to the Android string resources where I can change strings in one place and they are reused throughout the application? Also do iOS applications have some sort of unique ID, the equivalent of the Android's package name in the manifest.xml file? If I change this unique ID, does it impact the code in any way (in Android the package name corresponds to the main application Java package that starts the application).
The package name you referred is called Bundle Identifier in iOS world.
It can be changed in Project settings, or directly in the project property list (.plist) in the Xcode project.
The original value may look like:
com.example.${PRODUCT_NAME:rfc1034identifier}
You can change it to whatever valid values you want (highly suggest you use reversed FQDN format).
Remember to clean & rebuild to project after changing this value, and all App ID, Provisioning Profiles and probably certificates have to be re-configured.
I am developing an Android application named "English SMS Collection" in Google Play store, and now I want to upload this app in Hindi language also. So what changes are required to previous APK?
How to add another language to an Android application? And also what image size icons are required for uploading the app to market?
Any help would be appreciated.
Generally, splitting the same app into two functionally equivalent versions with different languages is a bad idea.
If you absolutely must do that, the only thing you need to change is the package name (package="com.example.project") in your AndroidManifest.xml (no need to rename actual packages, just that one string in manifest).
Also, if your Activities are declared relatively to app's package (e.g. .MyActivity as opposed to com.mypackage.activities.MyActivity) - and they most likely are - changing app's package name will obviously cause FCs because you effectively rename the activities. So to be able to switch the package name back and forth you'll have to detach Activity names from app's package by declaring them absolutely (e.g. com.mypackage.activities.MyActivity)
Here's a comprehensive guide on icons from Google, next time please do more research before asking such simple questions: Iconography
Also, judging by the question, you'll probably want to also read into this: Publishing Checklist for Google Play
Please DO NOT split your app up into two apks just because of the language. This is very bad style.
According to the android devleoper's guide, it's best practice to create ressource-folders with so called "configuration qualifiers". Your strings (e.g. text) should all be stored in the file /res/values/strings.xml . This is the default setup (without a configuration qualifier), when adding localized translations you have to create a new folder and strings.xml file /res/values-cc/strings.xml where cc has to be the standardized country/language code (e.g. "en" for english, "de" for german, "cs" for czech...).
For more (essential) informations on this, visit developer.android.com/guide/topics/resources/localization.html .
You need to change the package name because it should be unique while uploading in market. It can be signed with the same keystore file you have done for other two apps. Obviously, you have to change the Application name and its icon.
For more Information on Publishing Checklist for Android Apps, check this documentation.
In a Package Explorer, click on the package name (e.g: com.example.android), right-click and go to Refactor. Choose the Rename... option there.
I'm trying to find the best way to build/package an Android app for 6+ different customers. I could use different branches in SVN for all of the customers, but the only difference between the apps are some values in the resource folder (drawables, strings, etc).
I wrote an ant script that imports the standard Android build.xml. This script does the following:
Reads the customer names from a properties file.
For each customer the following is done:
The package name in AndroidManifest.xml is changed (by hooking into the -pre-build target).
The custom resources are copied into the res directory in the build (by hooking into the -pre-compile target).
The package name is changed back to the default value (by hooking into the -post-compile target).
The APK is copied to a specific location an named something like customer-versionno.apk.
This seemed to work well until I just now wrote the part that changes the package name. Because of the package name change the location of the R class is also changed, meaning that the build fails as the Java classes import the R class from the standard package.
I don't want to have a build script that changes code. I want to be able to do this with minimum changes to any files.
Soo..the questions are really:
Are there any good/simple solutions for my problem?
Am I approaching this problem in the wrong way? Are there better ways to easily package the same app to 6+ different customers?
Do you really need to change the package name? Changing the package name is a pain to do automatically. That being said, here is my solution to the problem:
My scenario is that I have one app that gets deployed to 30-200 different signed APK files where the only difference between the files are some resources (drawables, strings, values etc), and the package name.
I do this by working on a generic version of the app that serves as the template project. Once this works and I am ready to deploy I invoke a bash script that loops through the following steps for each target:
Clean the project completely
Swap out res dir and package name using sed.
Builds and signs the APK
This balances the horrific deply time with fast developemnt time. I really don't see another more elegant/robust solution than this.
And finally a small tip: In android manifest use relative package names like ".Application" instead of "com.mycompany.myproject.Application". This way you only need to change the package name in ONE location.
Is it possible to solve this with making 6+ different projects that includes your main projekt. This way you are able to override resources and make different apk's
I have been using apktool to decompile apps and make changes to better fit my touchpad.
One app in particular (swype) I would like to make a duplicate of with a different size keyboard I can switch to. I have tried changing in the manifest.xml any reference to com.swype I changed to com.thumbswype but when rebuilding the app it says some error about PathNotExist.
I also tried changing the app_name inside res/values/strings and while only changing this allowed me to rebuild the app It still wanted to overwrite the existing swype when I installed it.
The manifest is referring to class names in the compiled code, which would be in package comp.swype. So when you change the manifest but don’t change the compiled code, it can no longer find classes with the specified fully-qualified names.
And the Android system uses fully-qualified class names to identify installed apps. That’s why you can’t have two apps installed at the same time using the same fully-qualified names.