Every One
Can i Get BroadcastReceiver for This Intent when i press home Key :
Starting activity: Intent { act=android.intent.action.MAIN cat= [android.intent.category.HOME] flg=0x10200000 cmp=com.htc.launcher/.Launcher }
I don't want to Consider com.htc.luncher as it will we different for Other Android Device .
Here i my Simple Class For BroadcastReceiver :
public class HomeBrodcast extends BroadcastReceiver{
@Override
public void onReceive(Context context, Intent intent) {
Bundle bundle = intent.getExtras();
}
}
In Manifest :
<receiver android:name="xxx.yyy.zzz.sss.HomeBrodcast">
<intent-filter>
<action android:name="android.intent.action.MAIN"></action>
<categary android:name="android.intent.category.HOME"/>
</intent-filter>
</receiver>
For Register BroadcastReceiver in My Activity :
mHomeBrodcast=new HomeBrodcast();
IntentFilter mHomeFilter=new IntentFilter("android.intent.action.MAIN");
mHomeFilter.addCategory("android.intent.category.HOME");
registerReceiver(mHomeBrodcast, mHomeFilter);
Now Problem is When After Start My Application i press Home Button Press and My Log Show Me this Intent :
12-27 14:01:11.230: I/ActivityManager(123): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=com.htc.launcher/.Launcher }
So My Goal is to get Receiver for This Intent But When i Debug i am not Getting Any Thing Some Thing Must me Wrong .What should be Problem in Getting This Intent BroadCast .