我有一个应用程序,它安装在用户的手机中,并且在应用程序抽屉中仍然隐藏,要实现这一点,只需删除意图过滤器标签,这适用于 ICS 4.0 以下的所有内容,任何帮助让它工作在 ICS 中?
这在姜饼和 froyo 中运行良好,开始我的活动并保持隐藏抽屉中的应用程序图标,
<activity
android:label="@string/app_name"
android:name=".DashboardActivity" >
</activity>
但不能在 ICS 中工作,如果我删除这条线,活动将无法开始,有什么想法吗?
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
这是我的拨号盘监听器的代码
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.widget.Toast;
public class DialpadLauncher extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
// TODO Auto-generated method stub
Bundle bundle = intent.getExtras();
if (null == bundle)
return;
// outgoingNumber=intent.getStringExtra(Intent.ACTION_NEW_OUTGOING_CALL);
String phoneNumber = intent.getStringExtra(Intent.EXTRA_PHONE_NUMBER);
if (phoneNumber.equals("#00008#")){
//START APPLICATION HERE
//Toast.makeText(context,"DIALED: " + phoneNumber, Toast.LENGTH_LONG).show();
try {
Intent activity = new Intent(context, DashboardActivity.class);
activity.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(activity);
setResultData(null);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
// catch not found (only works on HTC phones)*/
}
}
}