Android keyguard widget not displayed

2.4k views Asked by At

I am working on a widget that needs to be displayed on keyguard, so here is my widget info :

<?xml version="1.0" encoding="utf-8"?>
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android" 
    android:initialKeyguardLayout="@layout/widget_layout"
    android:minWidth="294dp" 
    android:minHeight="72dp" 
    android:updatePeriodMillis="0"
    android:widgetCategory="keyguard">    

</appwidget-provider>

And here is part of my Manifest :

<receiver 
        android:name="com.view.KeyguardWidgetProvider" 
        android:icon="@drawable/idoogood_logo"
        android:label="@string/appwidget_name">
        <intent-filter >
            <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
            <action android:name="android.intent.action.USER_PRESENT"/>
        </intent-filter>
            <meta-data
            android:name="android.appwidget.provider"
            android:resource="@xml/widget_info" />
</receiver>

My problem is that the widget does not appear on the lockscreen. When I swipe the lockscreen to the left of right, nothing happends. And when I go into Settings=>Security, I don't have the option to enable Keyguard widgets. The widget works fine on the home screen.

Thanks for any suggestion.

0

There are 0 answers