Note that there are some explanatory texts on larger screens.

plurals
  1. POdashclock extension not working
    primarykey
    data
    text
    <p>I try to create a dashclock extension. The activity of the extension works ok but I cant see the icon in the dashclock widget and I thing that the service is not running (in the onInitialize method of the dasclock java class I write a log and when I execute never writes there). I don't know if the manifiest is not ok. Could you help me please? My manifiest is:</p> <pre><code> &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" package="es.defekas.horoscopodash" android:versionCode="1" android:versionName="1.0" &gt; &lt;uses-sdk android:minSdkVersion="8" android:targetSdkVersion="18" /&gt; &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/&gt; &lt;uses-permission android:name="android.permission.INTERNET"/&gt; &lt;application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" &gt; &lt;service android:name=".dash" android:icon="@drawable/ic_extension_dial" android:label="DashClock Horoscopo" android:permission="com.google.android.apps.dashclock.permission.READ_EXTENSION_DATA" &gt; &lt;intent-filter&gt; &lt;action android:name="com.google.android.apps.dashclock.Extension" /&gt; &lt;/intent-filter&gt; &lt;meta-data android:name="protocolVersion" android:value="1" /&gt; &lt;meta-data android:name="description" android:value="Es el mejor complemento del mundo" /&gt; &lt;!-- A settings activity is optional --&gt; &lt;meta-data android:name="settingsActivity" android:value=".principal" /&gt; &lt;/service&gt; &lt;activity android:name=".principal" android:exported="true" android:label="DashClock Horoscopo" /&gt; &lt;!--' &lt;activity android:name=".principal" 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; '--&gt; &lt;/application&gt; &lt;/manifest&gt; </code></pre> <p>Many thanks and sorry for my english!</p> <p>The code of the service:</p> <pre><code>public class dash extends DashClockExtension { // Acción del Intent que abre los resultados al pulsar la extensión public static final String ACTION_RESULTS = "es.defekas.horoscopodash.OPEN"; private SharedPreferences mPrefs; // Clave de las Shared Preferences, almacena el texto que queremos buscar public static final String QUERY = "query"; @Override protected void onInitialize(boolean isReconnect) { /* * Aquí llamaríamos a setUpdateWhenScreenOn(boolean) o addWatchContentUris(String[]) si quisiéramos usar dichas funciones. * En este caso no lo hacemos */ Log.d("DEFEKAS","============================================================================="); } protected void onUpdateData(int arg0) { // TODO Auto-generated method stub Log.d("DEFEKAS","YA ESTAMOS EN EL DASH Y EL VALOR DEL BLOQUEO ES ....."); // Creamos el objeto ExtensionData que rellenaremos con los datos que queremos mostrar en el Widget ExtensionData data = new ExtensionData(); data.icon(R.drawable.horoscopes); data.clickIntent(new Intent(ACTION_RESULTS)); try { // Hacemos la búsqueda en Twitter. Esto es independiente de nuestra extensión data.visible(true); data.status(); String correo = mPrefs.getString("signo", "No hay signo asociado"); Log.d("DEFEKAS","YA ESTAMOS EN EL DASH Y EL VALOR DEL BLOQUEO ES ....." + correo); data.expandedTitle(correo); // tarea ejecucion = new tarea(); // ejecucion.execute(correo); data.expandedBody(); // data.expandedBody(String.format(getString(R.string.extension_content_body), busqueda)); } catch (Exception e) { data.visible(true) .expandedTitle(e.getClass().getCanonicalName()) .expandedBody(e.getMessage()) .status("ERROR"); } // Y finalmente le decimos al Widget que actualice los datos publishUpdate(data); } </code></pre> <p>}</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. 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