It was a bug in Cupcake.

On Wed, Nov 11, 2009 at 10:27 PM, Andrew Ding <dingwei...@gmail.com> wrote:
> Hi, Dianne and all,
>
>    I have a requirement whish is same as that of Shaz. In
> chooseractivity, it can show all the activities who can perform an
> ACTION.
>
>    Now I want to disable one activity so taht the activity will not
> be shown in the ChooserActivity. So I use the API of
>
> setComponentEnabledSetting() too. It does not work at all, though no
> exception is thrown out. I tried it without DONT_KILL_APP.
>
>   Do you have any other good suggestion? Do I make something wrong?
>
> BR,
> Andrew
>
> On Nov 12, 12:01 pm, Dianne Hackborn <hack...@android.com> wrote:
>> Try it without DONT_KILL_APP.  There may be a bug in the delayed broadcast
>> that happens as a result of not killing the activity, which I was actually
>> just looking at. :)
>>
>> On Wed, Nov 11, 2009 at 7:42 PM, shahzad ahmad 
>> <shahzad.s.ah...@gmail.com>wrote:
>>
>>
>>
>>
>>
>> > hi,
>> >    I'm trying to remove activity icon from launcher panel. I'm using
>> > firmware 1.5. But nothing seems to work. I'm not receiving any error but
>> > activity icon is not removed. Following is the code
>>
>> > public class HelloActivity extends Activity {
>>
>> > public void onCreate(Bundle savedInstanceState) {
>> >         super.onCreate(savedInstanceState);
>> >        setContentView(R.layout.hello_activity);
>> > }
>>
>> >     public void onDestroy() {
>> >         super.onDestroy();
>> >         disbaleActivity();
>> > }
>>
>> >     private void disbaleActivity(){
>> >         ComponentName receiver = new
>> > ComponentName(getApplicationContext(),
>> >         "HelloActivity.class");
>> >         PackageManager pm = getPackageManager();
>> >         pm.setComponentEnabledSetting(receiver,
>> > PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
>> >                     PackageManager.DONT_KILL_APP);
>>
>> >     }
>> > }
>>
>> > I've set following permission in manifest file
>> > <uses-permission
>> > android:name="android.permission.CHANGE_COMPONENT_ENABLED_STATE" />
>>
>> > and following is portion of activity in manifest file
>>
>> >       <activity android:name="HelloActivity">
>> >             <intent-filter>
>> >                 <action android:name="android.intent.action.MAIN"/>
>> >                 <category android:name="android.intent.category.LAUNCHER"/>
>> >             </intent-filter>
>> >         </activity>
>>
>> > Please help me to resolve the issue. According to documentation it should
>> > work but it doesn't. I've tried calling disbaleActivity() even from
>> > OnCreate() method but no success :-(
>>
>> > Regards,
>> > shaz
>>
>> >  --
>> > 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<android-developers%2bunsubs­cr...@googlegroups.com>
>> > For more options, visit this group at
>> >http://groups.google.com/group/android-developers?hl=en
>>
>> --
>> 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.- Hide quoted text -
>>
>> - Show quoted text -
>
> --
> 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
>



-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  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

Reply via email to