[android-developers] Re: Changing application label from code

2009-08-27 Thread Dianne Hackborn
Sorry, there is currently no way to change the label dynamically.

On Thu, Aug 27, 2009 at 11:06 AM, Taísa Cristina wrote:

>
> Hi all,
>
> I have a Service which enables/disables an application launcher
> activity as follows. Can I change the application label from my code,
> while enabling the application launcher?
>
> "
> ComponentName cName = new ComponentName("my.package.name",
> "my.launcher.activity");
> int state = install ? PackageManager.COMPONENT_ENABLED_STATE_ENABLED
>: PackageManager.COMPONENT_ENABLED_STATE_DISABLED;
> try {
>pm.setComponentEnabledSetting(cName, state,
> PackageManager.DONT_KILL_APP);
> } catch (Exception e) {
>Log.d("TAG", "Could not change my app state");
> }
> "
>
> Thanks,
> Taísa
> >
>


-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Changing application label from code

2009-09-22 Thread Tsu

Hi,

I need to change application label based on the SIM Card carrier. I'm
trying to work around the above by adding values folders with mcc and
mnc information as stated on the following link.
http://developer.android.com/guide/topics/resources/resources-i18n.html#ReferencesToResources

On my sample application Im adding a values folder in the following
way "values-mccxxx-mncyyy" but this is also not working. Is there a
problem in the format Im using? Is any twikis on code needed?

Thanks a lot,
Renato


On 27 ago, 23:07, Dianne Hackborn  wrote:
> Sorry, there is currently no way to change the label dynamically.
>
> On Thu, Aug 27, 2009 at 11:06 AM, Taísa Cristina 
> wrote:
>
>
>
>
>
> > Hi all,
>
> > I have a Service which enables/disables an application launcher
> > activity as follows. Can I change the application label from my code,
> > while enabling the application launcher?
>
> > "
> > ComponentName cName = new ComponentName("my.package.name",
> > "my.launcher.activity");
> > int state = install ? PackageManager.COMPONENT_ENABLED_STATE_ENABLED
> >                : PackageManager.COMPONENT_ENABLED_STATE_DISABLED;
> > try {
> >        pm.setComponentEnabledSetting(cName, state,
> > PackageManager.DONT_KILL_APP);
> > } catch (Exception e) {
> >        Log.d("TAG", "Could not change my app state");
> > }
> > "
>
> > Thanks,
> > Taísa
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Changing application label from code

2009-09-22 Thread Dianne Hackborn
There are lots of examples in the framework here:

http://android.git.kernel.org/?p=platform/frameworks/base.git;a=tree;f=core/res/res

On Tue, Sep 22, 2009 at 7:43 AM, Tsu  wrote:

>
> Hi,
>
> I need to change application label based on the SIM Card carrier. I'm
> trying to work around the above by adding values folders with mcc and
> mnc information as stated on the following link.
>
> http://developer.android.com/guide/topics/resources/resources-i18n.html#ReferencesToResources
>
> On my sample application Im adding a values folder in the following
> way "values-mccxxx-mncyyy" but this is also not working. Is there a
> problem in the format Im using? Is any twikis on code needed?
>
> Thanks a lot,
> Renato
>
>
> On 27 ago, 23:07, Dianne Hackborn  wrote:
> > Sorry, there is currently no way to change the label dynamically.
> >
> > On Thu, Aug 27, 2009 at 11:06 AM, Taísa Cristina  >wrote:
> >
> >
> >
> >
> >
> > > Hi all,
> >
> > > I have a Service which enables/disables an application launcher
> > > activity as follows. Can I change the application label from my code,
> > > while enabling the application launcher?
> >
> > > "
> > > ComponentName cName = new ComponentName("my.package.name",
> > > "my.launcher.activity");
> > > int state = install ? PackageManager.COMPONENT_ENABLED_STATE_ENABLED
> > >: PackageManager.COMPONENT_ENABLED_STATE_DISABLED;
> > > try {
> > >pm.setComponentEnabledSetting(cName, state,
> > > PackageManager.DONT_KILL_APP);
> > > } catch (Exception e) {
> > >Log.d("TAG", "Could not change my app state");
> > > }
> > > "
> >
> > > Thanks,
> > > Taísa
> >
> > --
> > Dianne Hackborn
> > Android framework engineer
> > hack...@android.com
> >
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support, and so won't reply to such e-mails.  All such
> > questions should be posted on public forums, where I and others can see
> and
> > answer them.
>
> >
>


-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Changing application label from code

2009-09-24 Thread Gustavo Lima

Sorry Dianne but the link you provided has several samples like values-
mcc262-cs, values-mcc260, values-mcc204-de ... but none of them makes
use of MNC.

I'm having the same problem with with i18n for a specific carrier and
values-mcc724-mnc005 are not working on the real device. I have tried
several combinations like values-mcc724-mnc05, values-mcc724-mnc5,
values-mcc724-mnc005-pt and others.

Only the use of MCC alone values-mcc724 is working as expected.

thanks
Gustavo

On 22 set, 18:04, Dianne Hackborn  wrote:
> There are lots of examples in the framework here:
>
> http://android.git.kernel.org/?p=platform/frameworks/base.git;a=tree;...
>
>
>
>
>
> On Tue, Sep 22, 2009 at 7:43 AM, Tsu  wrote:
>
> > Hi,
>
> > I need to change application label based on the SIM Card carrier. I'm
> > trying to work around the above by adding values folders with mcc and
> > mnc information as stated on the following link.
>
> >http://developer.android.com/guide/topics/resources/resources-i18n.ht...
>
> > On my sample application Im adding a values folder in the following
> > way "values-mccxxx-mncyyy" but this is also not working. Is there a
> > problem in the format Im using? Is any twikis on code needed?
>
> > Thanks a lot,
> > Renato
>
> > On 27 ago, 23:07, Dianne Hackborn  wrote:
> > > Sorry, there is currently no way to change the label dynamically.
>
> > > On Thu, Aug 27, 2009 at 11:06 AM, Taísa Cristina  > >wrote:
>
> > > > Hi all,
>
> > > > I have a Service which enables/disables an application launcher
> > > > activity as follows. Can I change the application label from my code,
> > > > while enabling the application launcher?
>
> > > > "
> > > > ComponentName cName = new ComponentName("my.package.name",
> > > > "my.launcher.activity");
> > > > int state = install ? PackageManager.COMPONENT_ENABLED_STATE_ENABLED
> > > >                : PackageManager.COMPONENT_ENABLED_STATE_DISABLED;
> > > > try {
> > > >        pm.setComponentEnabledSetting(cName, state,
> > > > PackageManager.DONT_KILL_APP);
> > > > } catch (Exception e) {
> > > >        Log.d("TAG", "Could not change my app state");
> > > > }
> > > > "
>
> > > > Thanks,
> > > > Taísa
>
> > > --
> > > Dianne Hackborn
> > > Android framework engineer
> > > hack...@android.com
>
> > > Note: please don't send private questions to me, as I don't have time to
> > > provide private support, and so won't reply to such e-mails.  All such
> > > questions should be posted on public forums, where I and others can see
> > and
> > > answer them.
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.- Ocultar texto das mensagens anteriores -
>
> - Mostrar texto das mensagens anteriores -

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---