Re: [android-developers] Can't receive broadcast "PACKAGE_ADDED"

2009-12-02 Thread feng tian
Thanks very much.

2009/12/2 mingkg21 mingkg21 

>
> You also need to add .
>
>
> 2009/12/2 feng tian 
>
>> Hi, All:
>> I want to receive the broadcast intent "PACKAGE_ADDED", but it seems I
>> cant get it. Here are my codes, can someone check for me? Thanks very much.
>>
>> //TestReceiver.java, this is the class for receiving the intent. I just
>> display
>> package com.android.receiver;
>> import android.content.BroadcastReceiver;
>> import android.content.Context;
>> import android.content.Intent;
>> import android.widget.Toast;
>>
>> public class TestReceiver extends BroadcastReceiver {
>>  public void onReceive(Context arg0, Intent arg1) {
>>  Toast.makeText(arg0, "You have Received Broadcast",
>> Toast.LENGTH_LONG).show();
>>  }
>> }
>>
>> //ReceiveActivity.java, this is the class for activity
>> package com.android.receiver;
>> import android.app.Activity;
>> import android.os.Bundle;
>> public class ReceiverActivity extends Activity {
>> public void onCreate(Bundle savedInstanceState) {
>> super.onCreate(savedInstanceState);
>> setContentView(R.layout.main);
>> }
>> }
>>
>> I defined the filter in the manifest .xml file:
>>
>>
>>
>> I can detect the "TIME_SET" broadcast successfully. But I can't detect the
>> PACKAGE_ADDED broadcast when I installed a package. :(
>>
>>
>>
>>
>>  --
>> 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
>
>
>  --
> 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

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

Re: [android-developers] Can't receive broadcast "PACKAGE_ADDED"

2009-12-02 Thread mingkg21 mingkg21
You also need to add .


2009/12/2 feng tian 

> Hi, All:
> I want to receive the broadcast intent "PACKAGE_ADDED", but it seems I cant
> get it. Here are my codes, can someone check for me? Thanks very much.
>
> //TestReceiver.java, this is the class for receiving the intent. I just
> display
> package com.android.receiver;
> import android.content.BroadcastReceiver;
> import android.content.Context;
> import android.content.Intent;
> import android.widget.Toast;
>
> public class TestReceiver extends BroadcastReceiver {
>  public void onReceive(Context arg0, Intent arg1) {
>  Toast.makeText(arg0, "You have Received Broadcast",
> Toast.LENGTH_LONG).show();
>  }
> }
>
> //ReceiveActivity.java, this is the class for activity
> package com.android.receiver;
> import android.app.Activity;
> import android.os.Bundle;
> public class ReceiverActivity extends Activity {
> public void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
> setContentView(R.layout.main);
> }
> }
>
> I defined the filter in the manifest .xml file:
>
>
>
> I can detect the "TIME_SET" broadcast successfully. But I can't detect the
> PACKAGE_ADDED broadcast when I installed a package. :(
>
>
>
>
>  --
> 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

-- 
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] Can't receive broadcast "PACKAGE_ADDED"

2009-12-02 Thread feng tian
Hi, All:
I want to receive the broadcast intent "PACKAGE_ADDED", but it seems I cant
get it. Here are my codes, can someone check for me? Thanks very much.

//TestReceiver.java, this is the class for receiving the intent. I just
display
package com.android.receiver;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.widget.Toast;

public class TestReceiver extends BroadcastReceiver {
 public void onReceive(Context arg0, Intent arg1) {
 Toast.makeText(arg0, "You have Received Broadcast",
Toast.LENGTH_LONG).show();
 }
}

//ReceiveActivity.java, this is the class for activity
package com.android.receiver;
import android.app.Activity;
import android.os.Bundle;
public class ReceiverActivity extends Activity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}

I defined the filter in the manifest .xml file:
   
   

I can detect the "TIME_SET" broadcast successfully. But I can't detect the
PACKAGE_ADDED broadcast when I installed a package. :(

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