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); }

Android :: Changing locale programmatically (2.1 Update 1) does not work?


Android :: Changing Launch Activity Seems To Not Work On Update

Apr 26, 2010

For a new update I am changing the start-up work flow for the application. Part of this is setting the "android.intent.category.LAUNCHER" from one activity to another in my manifest. When I run an update from what is on the market to what I download from my website the application starts in the Activity where it used to start before the update. When I un install the application and install it from the same package I got from my website it starts in the Activity where I have now specified it to start. Shorter version: Update fails to update launching activity, un install- reinstall does update the launching activity. Is this a known issue? Do I really need to add logic to correct for people who update the app instead of installing fresh? Asking people to un install for an update is not a viable option. Is there something I can do to clean out whatever is getting saved that is causing the app to launch with the incorrect Activity? You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To un subscribe from this group, send email to android-developers+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en.

View 4 Replies View Related

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 - 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 :: 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.

View 2 Replies View Related

Android :: Changing Widget Layout Programmatically

Dec 7, 2009

Let's say that I have two layouts for a widget: Layout1 and Layout2. The default for the widget is Layout1, but I allow the user to choose which layout they want the widget to be. So if the user changes to Layout2, how do I programmatically change the layout to Layout2? There isn't a setContentView method for widgets like there is for Activities.

View 2 Replies View Related

Android :: Changing Signal Strength Programmatically

Sep 19, 2010

I want to change the network signal strength programmatic-ally in android..Even though signal is full i want to make it 50% or even 0%. Friends is it possible..?

View 1 Replies View Related

Android :: Detecting And Changing Programmatically Data Connection

Jun 14, 2010

I know that unfortunately detecting and changing programmatically data connection (GPRS/UMTS) on vanilla Android is not possible, and the common workaround is to edit APN settings. This is hardly a nice solution. However on my device (Xperia X10) I have an additional setting near "data roaming", that allows to enable or disable MMS and data. I suppose that this is a personalization made by Sony Ericsson, and maybe even other vendors have something like this. Is there a way to access this setting?

View 3 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

Samsung Moment :: Locale Does Not Work - Alternatives?

Dec 3, 2009

Background: Locale is an app which uses GPS to permit the user to define conditions, based on where the phone is. For example, when phone detects it is at work, it can set ringer to OFF, vibrate to ON, and WiFi to ON.

Some of the comments in the Market indicate that Locale does not work on the Moment. I had a Hero and Locale worked great, but now I ditched there Hero for the Moment and can not get Locale to work.

Has anyone been able to get Locale to work on the Moment? This will let me know if maybe I just need to keep trying stuff to get it to work.

Does anyone have an alternative for Locale? Mostly I would just like to automatically turn OFF my ringer when I get to the courthouse as cell phones are confiscated by the judge if they ring.

View 13 Replies View Related

Android :: Lost Calls After Programmatically Changing Phone Settings

Mar 9, 2010

if it's possible in Android to programatically change the phone internet settings (proxies also), email settings and other similar? Is there some kind of registry? and what about getting the lost/received/etc calls? is it possible to get that info?

View 1 Replies View Related

Android :: Changing Screen Brightness Programmatically In Android

Sep 17, 2010

I want to change the screen brightness programmatically in android.
WindowManager.LayoutParams lp = getWindow().getAttributes();
float brightness=1.0f;
lp.screenBrightness = brightness;
getWindow().setAttributes(lp);

But this sample code works on cutcake, not on latest versions. I am using latest version of SDK. How can I do it?

View 2 Replies View Related

Android :: Programmatically Update Widget From Activity?

Aug 11, 2010

I know it's possible, but I can't figure out a way to trigger an update of my widget from the main activity. Isn't there some general intent I can broadcast?

View 1 Replies View Related

Android :: Added Contact Not Visible In Contacts App / Programmatically Update Them?

May 6, 2010

I'm developping an application in Android 1.6 (and can't use 2.0 or older).

I add a new contact on my phone as following code...

After that, I add phone numbers in the same way. It works as I am able to view the new added contact with following code :

Intent intent = new Intent(Intent.ACTION_VIEW, contactUri);
this.startActivity(intent);

My problem is that, after adding and viewing the new contact, I can't see it in Contacts application unless I synchronized all my contacts (I also did a search with the contact's name, found it, nevertheless it wasn't added in contacts list).

How can I programmatically update the contacts in order to immediately have my new contact added in Contacts application?

View 1 Replies View Related

HTC Droid Eris :: How Google Voice Work On 2.1 - How Newest Gvoice Update Work On 1.5

Mar 28, 2010

I have google voice and use it for every phone call I make. I heard that there were issues with several gvoice updates, so I haven't updated google voice since 0.2.8 and it is working just fine- every call connects, no problems. Is it worth updating to the newest version of google voice with push? For those of you with 2.1 on your Eris- does google voice work for you?

View 12 Replies View Related

General :: How To Programmatically Install / Update In /system/app

Sep 5, 2013

I have made a little application pushed in /system/app with adb qui connect to a server and sometime download apk for updating/installing apk on the device.

My application is a kind of "updater". I alreay can : install new apk

But I can't update an apk which is already installed in /system/app/

I don't know why, but the update is in /data/app/my-update-1.apk

The application use the new version but, if i reboot the device (a Tao3530 tsunami board), the apk in /data/app/ is deleted and the old /system/app/original.apk version used.

How could i update an /system/app apk ? (without using ADb of course). If i need to use SU command (to push from download folder to /system/app, how could i root the board ?*

View 1 Replies View Related

Android :: EVO Is Offering The 2.2 Update - But Isnt Changing Anything

Aug 6, 2010

I downloaded the Android 2.2 update, it installed and everything, but it is still showing Android 2.1-update1 in the Phone info. After it reset, it said that Froyo was installed.

View 1 Replies View Related

Android :: Changing Entry Point Activity To App Messes Up App Update

Aug 9, 2010

This is the second time this has happened to me now. I changed the starting activity of my app, and put out an update, and now the icon on people's phone will not open my app. The only way they can open it is through the downloads section of their Android Market app, or if they uninstall and reinstall the app, causing them to lose ALL their data. I have no problem with updates on my N1, but every other Android phone has a problem with this. Why?

View 1 Replies View Related

Android :: After Changing A Preference - A Setting - Text Showing Settings Doesn't Update

Apr 13, 2010

I will try to explain a simple app scenario: My app goes right to a 'main view'. In this main view I have inserted a 'TextView' which displays current settings created by way of the PreferenceManager. For simplicities sake, let's say I have a checkbox in my settings. When I first start my app - the TextView on my main view shows my checkbox setting correctly (true). Now I go to the settings menu, it pops-up, and then I change it to false. I go back to the main view and...no change. It still say's true even after I changed it to false. If I end the app and then re-start it - all is well and it shows my change.

Apparently the main view just stays in the background while I'm changing settings? How can I redraw or update the main view after I change settings?

View 2 Replies View Related

HTC Desire :: Facebook And Flickr Update Frequency Keeps Changing / Stop It?

Jul 29, 2010

Even though I change my FB to update every 2 hrs and Flickr to once day, when I go back to check, FB always resets back to 'once a day' and Flickr resorts back to every hour.

Anyone else had this?

View 1 Replies View Related

General :: Can't Update Apps In Play Store After Changing Accounts

Jan 3, 2013

I am having an issue on my Asus Transformer Prime tablet. I had my account on there and downloaded a bunch of apps and games. My wife signed up for an account and we added that one and removed my account as she has taken over my tablet. LOL. The app/game says there is an update but when we go to the Play Store it will not allow us to update it, it only shows OPEN and UNINSTALL. If I add my account back onto the tablet the option for update is there.

Is there anyway to update the apps/games without my account being on there? I thought about just deleting the game and re-installing it under her account but that would erase all of her progress in the game.

View 1 Replies View Related

HTC Incredible : Incredible Display Is Changing / Setting To Work Out Color Balance

Sep 30, 2010

Over the past week, the display on my DInc has been slowly tinting toward a redish/pink hue. It appears the greys are turning pink. Anybody having this problem with their device? Is there a setting to work out the color balance anywhere?

View 2 Replies View Related

HTC EVO 4G :: Can't Load Stock Android After Update / Get It To Work?

Jun 30, 2010

I can not load stock android launcher after the new htc update. and im not the only one.. is it happening to anyone else?

View 3 Replies View Related

Android :: Update Doesn't Work When Using Content Resolver?

Mar 5, 2010

I have this code for update:
public Boolean update() {
try {data.put(Contacts Contract.Groups.SHOULD_SYNC, true);
Content Resolver cr = ctx.get Content Resolver();
Uri uri = Content Uris.with Appended Id(Contacts Contract.Groups.CONTENT_URI, Long.parse Long(get Id()));
int mid = cr.update(uri, data,_ID+"="+get Id(), null);
// notify registered observers that a row was updated
ctx.get Content Resolver().notify Change(
Contacts Contract.Groups.CONTENT_URI, null);
if (-1 == mid)
return false;
return true;
} catch (Exception e) {
Log.v(TAG(), e.get Message(), e);
return false.

View 1 Replies View Related

Android :: Update Item Position On Map Doesn't Work?

Nov 18, 2010

i have an android app, with a actitity, that shows a map, with a position. This possition is updated on sharedPreferences with a service... ok, that works fine. I need that my activity implements runnable to be a thread that read's the position of sharedPreferences each 1000ms and then update the item position on the map... but it doesn't works. As i saw in debug mode, my thread doesn't work fine, ONLY ENTER ONE TIME on RUN() method... i mean that never enters into RUN() method again, only one time, cause this, the positions doesn't be updated on the map. What is wrong? why this thread doesn't work fine?

public class Locate extends MapActivity{

private TextView userText = null;
private TextView permissionText = null;
private TextView lastUpdateText = null;
private Button locateButton = null;.............

View 4 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







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