"Multi-lingual Support" detection in Android - android

I am working on the new application and want to give users an option to change language based on their preference. At the same time, I don't want to show this options to such users whose device doesn't support multi-lingual.
Can you please help me with this?

The base Android already allows the user to select their language system wide, so you don't need to duplicate this feature in your app, and all you need to do is to provide resources in multiple languages. These will be picked up automatically by Activity.getString() and other resource aware routines.

Related

Android App Localisation - Downloading translations at runtime

I'm working on an app that needs to support a large number of languages. Instead of bundling all languages in the app resources, I want to be able to download the language when the user selects a new language from the settings menu.
The Facebook mobile app does this very well. If you are logged in, go to settings> languages > switch language > pick a different language.
I think Facebook are downloading these language resources, Because if i put my phone into airplane mode , it doesn't work ( prompted with try again, or use english as default).
Since the app resources can't be edited at runtime, i'm guessing Facebook are using a database to download the language , then load the translations from there?!
p.s i'm actually trying to do this in Xamarin...trying to understand the Facebook Android approach so I can implement it myself.
I don't know specifically about Facebook, but I know this technique is in use by some people -- I've seen presentations on similar setups from other companies. There are a couple of obvious benefits:
Reduce overall app size by not bundling 30 languages worth of strings.
The ability to improve localized strings without forcing the user to download an app update.
Better data about what languages your users are using.
When I've seen in presented (again, this was not Facebook specifically), it worked much as you suggested -- user selects the preferred language, app fetches a string bundle from the server, then starts using it. Once the language is set, the app can even periodically refresh the localized string bundle to get updates.
However, there are some downsides to be aware of, especially if the localized strings change over time. It can make support tricky -- if a string has changed, a button (for example) might be called different things depending on exactly when the user was using the app. It also will really put pressure on your i18n strategy and QA to make sure the UI looks decent with strings that might be changing frequently.
If you download localization files you will not be able to use the default localization support within Android.
If you do go ahead with this strategy (downloading of localization files), you will need to create your own class to manage this or alternatively, search for a library which does this for you.

Changing iOS and Android app's name and icon on the fly

Okay, I know the title is a bit confusing so let me explain it a little bit more.
We have different groups of clients and they want to have their own app, meaning the app name, icon, splash screen and theme colour are customized. But the functionalities and features remain the same across the whole product line.
Of course, we can submit different app for different client. But the maintenance would be a nightmare to the development team - each new feature / bug fixes needed to be pushed to different branches and we need to do multiple app update. Furthermore, we need to do manual testing on all the variants. We do not want to go down this road.
As a developer, I want to have a generic app for app submission and update. But once the client signed up then we change the app name, icon and splash screen according to his settings. I know I can do the splash screen and theme color - just render a different image and RGB value from the server on login. But I do not know if there is way to changed the app name and icon after the app installation.
I have also done preliminary search on this question but the answer I got is a no. Since those answers are from 2011 so I wonder if the situation has changed or not.
Many Thanks!
P.S. I found a group of apps on App Store which cover the question I asked. It is called DropLocker. They have 14 variants but I guess they use the same code base. I wonder if there is an update, do they push it individually or there is a way to do a multiple app updates at one shot.
For iOS apps, you can create targets in the same app and for each target you can change the appicons, splash screen, theme color etc.
To create target, go to your Project, On Left side, under "TARGETS", you will see, two targets, one with your Project name, other with Test. Right click your project and click "Duplicate". Then you can rename the target. Also rename the target in "Manage Schemes", to avoid confusion later on. Then, you can change the app name seperately for all targets in "info" section. Similarly, you can create a different sets of Appicons and splash screens and use them for different targets. To change theme color, you can define a "Preprocessor Macro" in Build Settings and use it inside your code. You can set the macro's value for different targets.

Creating an app/widget in Android to clear the default values of a certain app

I need to write a code to create an app/widget that will "Clear Defaults" for an app. Instead of going to "Settings->Applications->[The App]->Clear Defaults", the user will click on the app icon (or widget) to clear these default values.
I am new to Android. I just want some help to create and build my first Android app/widget.
Many thanks...
You cannot affect other apps in this fashion. Only the Settings app, or possibly apps written as part of the device firmware, can change the default apps for particular Intent constructs.

Android search settings for different user profiles

Does anyone know that is it possible to have a multiple user profiles in an Android device. If it is possible then will it be possible also to separate the search history or search settings for different user profiles? We are working on a custom Android device and trying to have different user profiles there. Although my job is not to find how to create multiple users but I got the task to find out how to differ the search settings for different users on the same device. I have checked almost everything in Android developer guide for searches and cant find anything like that. Any answers or clues or suggestions will be highly appreciated.
You cannot have multiple profiles on standard Android devices. You will have to create a highly customized ROM for this. I wish you fellows luck.
I guess since you are saying that you are building a custom android device you are building the
source from Android Open Source Project(AOSP). Since you have access to the entire source code, you
could set the system property 'fw.max_users=4' or any number you want greater than 1 to enable
multiple user profiles on the device. You could set this value in your device's system.prop file.
This feature probably started out in Android 4.2
But I don't there is currently any way to separate search history and search settings.
I see that this question was asked a long time ago, but it may help any new users who have the same
question.

Can you change your app name (this under icon in list of application) dynamically?

I am wondering which name will be better for my app. I am thinking about experiment, which will change name of application (in 10% downloaded apps). Later I could check statistics which app was used more often.
Is this possible?
No. The app name is specified in your manifest so it will be static. You could change the name in the titlebar of the app though.
Picking a good name is key.
depending on exactly what you want you have a few options. You can call
this.setTitle("New Title Here");
from an Activity and this will change the title that appears at the top of the screen just beneath the notification bar. If you are trying to change the title that appears in the launcher, or on the home screen under the icon I don't think you can do this programmatically. You'd have to create two seperate versions of your application and use the different values for < application android:label> inside your manifest for each of them. Or maybe you could create another values folder like values-hdpi if the values folder works the same as the layout and drawable folders (which I suspect it does, but I've never tested.) then it would pull the value from the Strings.xml file inside the hdpi folder if the device has high density display, so you could get a different name for those devices. Maybe using this method you could use a language modifier like values-esp and somehow force the app to go into 'spanish mode' for a certain subset of users so that it pulls this alternate value.
If I understand your question correctly, you want to know if it's possible to test different names on the Android Market, correct?
The only way to do this with the Google Market is to have two separate copies of your app, but using different package names for each. The name that appears in the Market is set on the Developer Console, and while it can be changed, you will not see two different entries for your app in the market.
This is because the market uses your package name to identify your app, not the app name that you supply.
So, while it's easy to change the display name of the app while it is running by using setTitle as #Tim and #Robby have said, this only changes the app title while it is running - it does not affect the name used in the Android package manager, and it also does not affect the name displayed in the Market.
As I say above, if you are wanting to test which name is more popular and therefore results in more downloads, you will need to have multiple apps on the market with different package names. You will also then have to consider how to handle upgrades, and if one name turns out to be very popular, I don't think there's any facility to "upgrade" the other users to your new package name since they are different packages and therefore there is no upgrade path. This means you'll either have to inconvenience users of the old name by somehow asking them to switch to the new app name, or maintain all named versions of your app for the expected lifetime of it.
If you do get your users to switch to the new app, you will then also have to consider how to migrate their data. This can be done (3G watchdog does it when you upgrade from the lite version to pro), but it's an extra layer of complexity that you can avoid.

Categories

Resources