Mark, et al

Thanks for that. Perhaps not the best way, but I am still trying to get the
Intent-Method to work.

Aside: In experimenting, I can receive   android.intent.action.PHONE_STATE
(but not my broadcast).

The app sends the Intent, but the widget never shows Log.d() in
MyIntentReceiver.java.

Q: Do I need the <meta> tag?
Q: Do I need a permissions tag?

Thanks for continued help.
jp

-------status bar app----------------------------------------

public class StatusBarNotifications extends Activity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.status_bar_notifications);

        Uri uri = Uri.parse("55");
        Intent intent = new
Intent("org.jamesp.gpscruise.UpdateWidgetAction", uri);
        sendBroadcast(intent);


------widget --(Manifest, MyIntentReceiver.java)---------------------

        <receiver android:name=".MyIntentReceiver"
android:label="@string/widget_name">
            <intent-filter>
                <action
android:name="org.jamesp.gpscruise.UpdateWidgetAction" />
            </intent-filter>
        </receiver>


    public void onUpdate(Context context, AppWidgetManager appWidgetManager,
            int[] appWidgetIds) {
        Log.d("TAG","MyIntentReceiver: onUpdate()");
    }
    @Override
    public void onReceive(Context context, Intent intent) {
        Log.d("TAG","MyIntentReceiver: onReceive");
    }
}

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to