我想修改一个APK,希望他不出现在最近程序列表里面 请大侠帮忙!!!谢啦
我想修改一个APK,这个软件是 IPHONE通知
软件地址是http://bbs.xda.cn/thread-11161858-1-1.html
希望他不出现在最近程序列表里面 网上说可以添加代码android:excludeFromRecents="true"来解决问题 但是我添加了 只是第一次安装的时候好使 当手机重启之后就不好使了 为什么呢??
这算是原来的代码
<?xml version="1.0" encoding="utf-8"?>
<manifest android:versionCode="42" android:versionName="5.8" package="com.nlucas.iphonenotifications"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.READ_SMS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.hardware.sensor.proximity" />
<uses-permission android:name="com.android.vending.CHECK_LICENSE" />
<application android:label="@string/app_name" android:icon="@drawable/icon">
<activity android:theme="@style/AppTheme" android:name="com.nlucas.iphonenotifications.IPhoneNotificationsPreferences" />
<activity android:theme="@style/AppTheme" android:name="com.nlucas.notifications.commons.preference.SingleAppPreferences" />
<activity android:theme="@style/AppTheme" android:name="com.nlucas.notifications.commons.preference.DefaultSettingsPreferences" />
<activity android:theme="@style/AppTheme" android:name="com.nlucas.notifications.commons.preference.AlertPreferences" />
<activity android:theme="@style/AppTheme" android:name="com.nlucas.notifications.commons.preference.AppearancePreferences" />
<activity android:theme="@style/AppTheme" android:name="com.nlucas.notifications.commons.preference.RemindersPreferences" />
<activity android:theme="@style/AppTheme" android:name="com.nlucas.notifications.commons.preference.SoundPreferences" />
<activity android:theme="@style/AppTheme" android:name="com.nlucas.notifications.commons.preference.VibrationPreferences" />
<activity android:theme="@style/AppTheme" android:name="com.nlucas.notifications.commons.preference.BannerPreferences" />
<activity android:theme="@style/AppTheme" android:name="com.nlucas.notifications.commons.preference.PrivacyPreferences" />
<activity android:theme="@style/AppTheme" android:name="com.nlucas.notifications.commons.preference.QuietHoursPreferences" />
<activity android:theme="@style/AppTheme" android:name="com.nlucas.iphonenotifications.Main">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:theme="@style/Theme.Transparent" android:label="@string/app_name" android:name="com.nlucas.notifications.commons.popup.PopupActivity" android:launchMode="singleInstance" />
<activity android:label="@string/app_name" android:name="com.nlucas.iphonenotifications.Tutorial1Activity" android:noHistory="true" />
<activity android:label="@string/app_name" android:name="com.nlucas.iphonenotifications.Tutorial2Activity" android:noHistory="true" />
<activity android:label="@string/app_name" android:name="com.nlucas.notifications.commons.NotificationService" android:noHistory="true" />
<activity android:theme="@style/AppTheme" android:name="com.nlucas.notifications.commons.preference.AlertThemeSelector" />
<activity android:theme="@style/AppTheme" android:name="com.nlucas.notifications.commons.preference.BannerThemeSelector" />
<service android:label="@string/service" android:name="com.nlucas.iphonenotifications.IPhoneNotificationsService">
<intent-filter>
<action android:name="android.accessibilityservice.AccessibilityService" />
</intent-filter>
<meta-data android:name="android.accessibilityservice" android:resource="@xml/accessibility_service_config" />
</service>
<receiver android:name="com.nlucas.notifications.commons.lock.LockReceiver" />
<receiver android:name="com.nlucas.notifications.commons.AlarmReceiver" />
<receiver android:name="com.nlucas.notifications.commons.lock.ScreenReceiver" />
<receiver android:name="com.nlucas.notifications.commons.sms.SMSReceiver" android:enabled="true">
<intent-filter>
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
</intent-filter>
</receiver>
</application>
</manifest>
请问是不是只要在
</activity>下加代码
android:excludeFromRecents="true"
就可以啊?谢谢啦
android activity
[解决办法]
将相应Activity 中加入android:excludeFromRecents="true" 就不会出现在近期运行列表了
<activity android:name="SimpleTestingSettings" android:label="@string/testing"
android:excludeFromRecents="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>