1. Download our Official Android App: Forums for Android!

Apps PreferenceActivity as main Activity. Widget

Discussion in 'Android Development' started by wallieballie, Feb 25, 2011.

  1. wallieballie

    wallieballie Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    1
    Joined:
    Feb 25, 2011

    Feb 25, 2011
    1
    0
    5
    How do I configure the AndroidManifest to use a PreferenceActivity as main Activity for my Widget. The preference should appear when creating the widget. If I use the AndroidManifest posted below, I get a popup-message telling me that the application is not installed on my phone when lauching/creating a new widget.

    Code (Text):
    1.  
    2.  
    3. <application
    4.     android:icon="@drawable/icon"
    5.     android:label="@string/app_name"
    6.     android:debuggable="true">
    7.     <activity
    8.         android:name=".WidgetPreference"
    9.         android:label="@string/app_name">
    10.         <intent-filter>
    11.             <action
    12.                 android:name="android.intent.action.MAIN" />
    13.             <category
    14.                 android:name="android.intent.category.LAUNCHER" />
    15.         </intent-filter>
    16.         <intent-filter>
    17.             <action
    18.                 android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
    19.         </intent-filter>
    20.     </activity>
    21.     <receiver
    22.         android:name="Widget">
    23.         <intent-filter>
    24.             <action
    25.                 android:name="android.appwidget.action.APPWIDGET_UPDATE" />
    26.         </intent-filter>
    27.         <meta-data
    28.             android:name="android.appwidget.provider"
    29.             android:resource="@xml/imageswidget_info" />
    30.     </receiver>
    31.  
    32. </application>
    33.  
    34.  
    35.  
     

    Advertisement

  2. alostpacket

    alostpacket Over Macho Grande?
    Rank:
    None
    Points:
    513
    Posts:
    7,972
    Joined:
    Nov 29, 2009

    Nov 29, 2009
    7,972
    3,603
    513
    Android App Developer
    NY
    what does the manifest tag look like?


    is WidgetPreference at the root of your application's package?
     

Share This Page

Loading...