Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The reason for this is actually described <a href="http://groups.google.com/group/android-developers/browse_thread/thread/6ef964dc4395e979/161a79b9a4d0a753?show_docid=161a79b9a4d0a753&amp;pli=1" rel="nofollow">here</a> and it is by design as of Android 3.1. By default, the installLocation will already be set to "internalOnly" so that should not fix the problem and neither should a reboot.</p> <p>To work around this, an activity needs to be triggered in your widget. This will activate it and it will then appear in the widget list.</p> <p>To do this, you can add an activity that essentially does nothing like this:</p> <p>1) In your AndroidManifest.xml, add this inside your "application" tag:</p> <pre><code>&lt;activity android:name=".DummyActivity" android:label="@string/app_name"&gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.MAIN" /&gt; &lt;category android:name="android.intent.category.LAUNCHER" /&gt; &lt;/intent-filter&gt; &lt;/activity&gt; </code></pre> <p>2) Then create a "DummyActivity.java" class in your "src" like this:</p> <pre><code>package com.domain.app; import android.app.Activity; import android.os.Bundle; public class DummyActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); finish(); } } </code></pre> <p>Now, when you deploy the widget to your device, that activity will be launched automatically (you'll see a message in your Eclipse console saying "starting activity ...") and it will immediately "finish" without showing anything visual on the device. And now your widget will be listed in the widget list!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload