Android :: Changing The Android Emulator Locale Automatically

Mar 10, 2010

For automated testing (using Hudson) I have a script that generates a bunch of emulators for many combinations of Android OS version, screen resolution, screen density and language.
This works fine, except for the language part.

I need to find a way to change the Android system locale automatically.

Here's some approaches I can think of, in order of preference:

Extracting/editing/repacking a QEMU image directly before starting the emulator
Running some sort of system-locale-changing APK on the emulator after startup
Changing the locale settings on the emulator filesystem after startup
Changing the locale settings in some SQLite DB on the emulator after startup
Running a key sequence (via the emulator's telnet interface) that would open the settings app and change the locale

Manually starting the emulator for each platform version, changing the locale by hand in the settings, saving it and archiving the images for later deployment

Any ideas whether this can be done, either via the above methods or otherwise?

Do you know where locale settings are persisted to/read from by the system?

I have updated his answer below with the details.

Android :: Changing the Android emulator locale automatically


Android :: Changing Locale Within The App Itself

Feb 15, 2010

My users can change the Locale within the app (they may want to keep their phone settings in English but read the content of my app in French, Dutch or any other language ...)

Why is this working perfectly fine in 1.5/1.6 but NOT in 2.0 anymore?

CODE:..........

The problem is that the MENU "shrinks" more and more everytime the user is going through the lines of code above ...

This is the Menu that gets shrunk:

CODE:.........

What should I do in API Level 5 to make this work again ?

HERE IS THE FULL CODE IF YOU WANT TO TEST THIS :

CODE:..............

AND HERE IS THE MANIFEST :

CODE:..........

THIS IS WHAT I FOUND :

<uses-sdk android:minSdkVersion="5" />

=> IT WORKS JUST FINE ...

<uses-sdk android:minSdkVersion="3" />

=> Menu shrinks every time you change the locale!

As I want to keep my application accessible for users on 1.5.

View 3 Replies View Related

Android :: Changing Locale Programmatically (2.1 Update 1) Does Not Work?

Sep 10, 2010

I am trying to change the locale programmatically on Android. The code I have below works fine on the Incredible(2.2) and Droid(2.2). However, it doesn't on the DroidX(2.1 Update 1) Anyone here have encountered similar problem ?? Any insight would be helpful.

public void overrideLocale(String languageToLoad) {
Locale locale = new Locale(languageToLoad);
Locale.setDefault(locale);
Configuration config = new Configuration();
config.locale = locale;
getBaseContext().getResources().updateConfiguration(config, null);
Intent intent = new Intent(this, ActivityB.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent); }

View 1 Replies View Related

Android :: Changing Locale - Force Activity To Reload Resources

Apr 15, 2010

I have a language setting in my application. When the language is switched, I would like all the textviews etc to change language immediately. Currently I just change the locale in the configuration, so the language has changed when the user restarts the activity.

Solution to my problem would be to make each textview load the new resources each time the language is changed. Is there a better solution? Perhaps a neat way to discretely restart the activity? Or maybe just force reload of the resources?

View 2 Replies View Related

Android :: Localization Support Without Changing Locale / Language Of Device?

Jul 28, 2010

I created a set of text resources in different languages:

res/values-de/strings.xml
res/values-fr/strings.xml
res/values-ja/strings.xml

when a user runs our application, the Android system selects which resources to load, based on the device's locale.

So basically I want to add language option in my application and save user language preference, then load text resources based on user preference.

Is there any way to do this?

View 2 Replies View Related

Android :: Application For Changing Wallpapers Automatically

Jun 6, 2010

I am new to android programming and want to develop an application similar to vista where the wallpaper changes automatically, so how should I go about it?

View 4 Replies View Related

General :: SGN2 GT-N7102 Keep Changing Its Mac Address Automatically

Apr 23, 2013

- I've a wifi network at home based on mac filtering.

- 3 days ago,I bought a Galaxy note 2 model: GT-N7102.

- I normally searched for it's wifi mac address and insert it in the router and get connected the internet.

- Next day I couldn't get connected to the internet!... When I checked the device mac address and I found it changed !!!!!! (it was 00:08:22:e8:f5:99 and changed to 00:08:22:5c:44:f5 !!!) later, after I went out and get back to home and tried to connect to internet, again I couldn't and the reason was that I found the mac address changed again!!! the new one was 00:08:22:1c:88:fc !!!

- It is continuing... every time I get new mac address and I must insert it to router to be able to connect to the internet.

View 5 Replies View Related

Sprint HTC Hero :: Phone Automatically Changing Mode - Portrait / Landscape

Mar 8, 2010

When I go to portrait to landscape it will stay on portrait then after I mean like 20 mins or so when I go to use it, it will go to landscape and portrait. Then after another while it will stay on portrait and not go to landscape. I've tried everything and tried to find a solution for this but don't seem to find one. I just got the phone on saturday and been playing with for awhile to get the feel of it.

View 2 Replies View Related

Android :: Changing Screen Brightness In Android Emulator

Oct 5, 2010

Can screen brightness changes be tested in the Android emulator? I've tried various examples that all use the following code snippet:
WindowManager.LayoutParams lp = window.getAttributes();
lp.screenBrightness = (*some float percentage*);
window.setAttributes(lp);

But I don't see any change in brightness in the emulator. I've tested it in cupcake and 2.2.

View 1 Replies View Related

Android :: App - Locale

Jun 24, 2010

Locale is one of my faverate App, it can create situations specifying conditions under which your phone's settings should change. For example, your "At School" situation notices when your location condition is "77 Massachusetts Ave.," and changes your ringer volume setting to vibrate.

With Locale's advanced touch-screen interface, you'll be set up in no time. Quickly define locations that are important to you using a simple Google Maps interface.

If you think this is exactly what you are looking for, you can download it in the market

View 4 Replies View Related

Android :: Get Current Locale

Jun 15, 2009

Does anyone know how to get current locale in program?

View 3 Replies View Related

Android :: Locale Spanish

Jun 16, 2009

So there is Locale for all other countries/languages where apps are available but I can't set Locale for Spain/Spanish?

See Locale list: http://developer.android.com/reference/java/util/Locale.html

How can I get Locale.SPANISH so that I can set my app to spanish? res/ values-es

How can I find or create a Locale.SPANISH?

View 2 Replies View Related

Android :: Scenes For Locale

Dec 7, 2009

Does that just make too much sense to hope for? I'd love for my home screens to automatically change for qork, travel, weekends, nights, etc.

View 1 Replies View Related

Android :: Locale Icon

Jan 28, 2009

Is there any way to get rid of the the stupid red balloon locale icon that shows up in the notification bar? I can't stand having icons up there, its a pain to clear them.

View 3 Replies View Related

Android :: Locale Alternative

Apr 17, 2010

I'm about to get my first Android phone and I'm wondering what your favorite alternative to Locale is? I'm seeing reviews that are less and less favorable and for a $10 app, it out to be darn amazing in my book.

View 21 Replies View Related

Android :: Cannot Find Locale

Aug 2, 2009

I've been looking for this app:

Locale for Android

The website states that it can be downloaded over at Android Market but I can't find it anywhere.

View 7 Replies View Related

Android :: Locale Type Application

Oct 12, 2010

Does anyone know a Locale-like application that is free? I don't really care about GPS settings, more time.

View 5 Replies View Related

Android :: Locale Update Settings

Feb 11, 2010

Is there a way to slow down the gps update setting on locale? It seems to check about every 4 - 5 mins or so for me. is there a way to slow it down? I fear it is killing my battery

View 10 Replies View Related

Android :: How To Know If Somebody Has Changed Locale In Settings

Oct 27, 2010

I am writing a service in which I want to have an observer kind of thing for the phone Locale, which lets me know if any one has changed the Locale through Settings->Language & keyboard. Is there a way to do this?

View 2 Replies View Related

Android :: How To Retrieve Locale Independent App?

Jan 21, 2010

I'm using PackageManager.getApplicationLabel(ApplicationInfo) to retrieve application labels. It looks like the label that is returned depends on the Locale set for the phone. For instance with the music app I get "Music" in English, vs. "Musica" if I have my locale set to Spanish. Is there a way to get the default application label (perhaps as defined in strings.xml)? I want to be able to retrieve an application label for each app that is independent of locale.

View 1 Replies View Related

Android :: Wi-Fi Keeps Turning On And Locale Isn't Working

Jun 16, 2010

I've already read the issues with Locale, and that's sad, because I love the concept of the app. Even before I bought a smartphone and knew about Locale, I wished the existence of such a thing would exist. Hence my excitement when I got it was off the charts, but now, not so much. The situations aren't enabling and it's the same 'ole story of "Defaults" dicking everything up.

Can someone please make a Locale that works? (rhetorical question...).

Anyways, another frustration I've come across is that my Wi-Fi keeps turning on. Does anyone know what setting is causing this? I'm about to do a hard reset again and just say screw it.

View 4 Replies View Related

Android :: Can I Obtain Resources With A Given Locale

Jul 28, 2009

I have different text packaged into my app for different locale. The Resource.getString(int resid) method automatically returns me the string for the CURRENT locale of the phone. Is there a way I can specifically obtain resources while passing in a locale? For example, there isn't such method as: Resource.getString(int resId, Locale myLocale);

View 3 Replies View Related

Android :: IME Preference In Locale&Text

Sep 23, 2009

Is there a way to add my IME Preferences to the "Locale&Text" menu, just like the Latin and Pinyin IME's. Or is this restricted to the keyboards that ship with the platform?

View 6 Replies View Related

Android :: Launch App With Specific Locale

Jun 10, 2010

Changing the locale for a device is done in the settings, and can't be done by an app AFAIK.I know how to force my own app to a specific locale,So now to my question. Can I force, programatically, the local of an activity that isn't mine?I can imagine 2 ways this could be possible:Specifying the locale in an Intent used to start the activity.
Access and manipulate the configuration of running activities (in the same way as I can modify my own activities' configurations).Any thoughts? Is it possible? Is it reasonable?
I guess 2. would be more direct, but require some kind of permission (e.g. the modified atcitiy must allow it in the manifest file). But I'd settle for 1. or similar.

What I want is to be able to see certain apps in a different language, but rather not change the system locale. E.g. the Android Market, that only displays comments in one language. Can't think of other things right now.Can't find much written on Locale in the documentation, what is and isn't possible. But hoping some undocumented feature might enable this :)

View 2 Replies View Related

General :: How To Add More Languages (locale) Into 2.1 Android

Feb 3, 2012

Ok im now using huawei u8120 and I have installed modificated 2.1 android (yes i can install 2.3.7 cm7 but its slow) and i wanna ask how can i add more languages (locale)in to 2.1 android like lithuania locale ?

View 1 Replies View Related

Android :: Settings / Profile Switching App - Not Locale

Nov 6, 2009

I'm looking for an app that will allow me to set up different profiles for phone settings that can be switched easily by choosing a "profile" from a list.I DON'T want Locale. i want to be able to do this by choosing from a list, NOT based on my location.For example, a user could set up a Power Saver profile, a Power User profile, an Online Profile, etc. Each of these profiles should be customizable. For example, I should be able to customize the "Power Saver" profile to the power settings I want (ie. Screen brightness, WiFi off, Bluetooth Off, Syncing Off, etc).Is there anything like this? Ideally I'm hoping for something that has a free version, as I am in Canada and we can't get paid apps yet.For the record, I am using Useful Switchers, but I don't want to have to go through all the various steps each time I want to go back and forth from power saving and using my phone online.

View 5 Replies View Related

Android :: Locale - Not Switching Back To Defaults

Dec 1, 2008

new to Android, G1 and the forums Wondered if any of you can help?
I have 4 things set up in locale
1) turn on silent when at work
2) turn on Wi-fi when at home
3) turn on silent 6:30PM to 7:30PM (when getting my son to bed)
4) turn on silent 11PM to 8AM (so no emails are waking me!) number 2 works fine, the problem however is with the silent ones, ALL of them never go back to the default (ringer at full volume) when the time is up or when I'm away from the location. any ideas? I don't have GPS on, but the distance from home to work is large so it can't think I'm still anywhere near there plus that won't affect the time related ones.

View 2 Replies View Related

Android :: Do Locale / Power Manager Conflict?

Mar 6, 2009

I just downloaded Locale and have the free Power Manager. My question is, do they conflict on settings, and do I have to disable one to get the other to work correctly?

View 4 Replies View Related

Android :: Locale Setting - Difference Between Locales Ja And Ja_ JP

Nov 16, 2010

What is the difference between locales ja and ja_JP in Android? Do I have to care about both?

View 1 Replies View Related

Android :: Forced Locale Resetted On Orientation Changes

Feb 24, 2010

I try to force the locale in my app to one the user specified. As this may be used to demonstrations, I want to change the language/locale in the app and not anytime for the whole device.

I looked around SO and tried to use every hint I found here. The result: I can restart my test activity with the new language, but if I change the orientation, the locale will always be reseted to the device one.

I uploaded a minimalistic project so you can reproduce my issue. Please ignore the shrinking of the UI, its not important :)

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved