小部件未出现在应用列表中

时间:2013-04-28 21:50:00

标签: android widget

我创建了一个小部件,它没有在小部件列表中显示,但是当我转到Settings->应用程序管理器时,小部件IS在应用程序列表中。我正在调试它,它之前就像一个魅力,但它突然消失了。我认为这与我的清单有关。如果你需要剩下的代码,我可以把它放在我的Dropbox上。

我目前正在运行4.1.1并且我的日志表明没有任何问题...帮助:/

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.ps.transparenttogglewidget"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="17" />
    <uses-permission android:name="android.permission.WRITE_SETTINGS" />
    <uses-permission android:name="android.permission.VIBRATE"/>
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission>
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"></uses-permission>
    <uses-permission android:name="android.permission.WAKE_LOCK"></uses-permission>
    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <!-- AIRPLANE MODE CODE -->
        <receiver android:name="AirplaneModeWidget" >
            <intent-filter>
                <action android:name="android.appwidget.action.AIRPLANE_WIDGET_UPDATE" />
            </intent-filter>
            <meta-data
                android:name="android.appwidget.provider"
                android:resource="@xml/airplane_mode_provider" />
        </receiver>
        <receiver
            android:name="AirplaneModeIntentReceiver"
            android:label="AirplaneModeBroadcastReceiver" >
            <intent-filter>
                <action android:name="com.ps.transparenttogglewidget.intent.action.AIRPLANEMODE_CHANGE_STATUS" />
            </intent-filter>
            <meta-data
                android:name="android.appwidget.provider"
                android:resource="@xml/airplane_mode_provider" />
        </receiver>
        <receiver android:name="AirplaneModeReceiver">
            <intent-filter>
                <action android:name="android.intent.action.AIRPLANE_MODE">
                </action>
            </intent-filter>
        </receiver>
        <!-- WIFI MODE CODE -->
        <receiver android:name="WifiModeWidget" >
            <intent-filter>
                <action android:name="android.appwidget.action.WIFI_WIDGET_UPDATE" />
            </intent-filter>
            <meta-data
                android:name="android.appwidget.provider"
                android:resource="@xml/wifi_provider" />
        </receiver>
        <receiver
            android:name="WifiModeIntentReceiver"
            android:label="WifiModeBroadcastReceiver" >
            <intent-filter>
                <action android:name="com.ps.transparenttogglewidget.intent.action.WIFI_MODE_CHANGE_STATUS" />
            </intent-filter>
            <meta-data
                android:name="android.appwidget.provider"
                android:resource="@xml/wifi_provider" />
        </receiver>
        <receiver android:name="WifiModeReceiver">
            <intent-filter>
                <action android:name="android.intent.action.WIFI_MODE">
                </action>
            </intent-filter>
        </receiver>
    </application>
</manifest>

0 个答案:

没有答案