Congratulations, James.
Note: you can merge the broadcast receiver with your AppWidgetProvider,
same one that handles APPWIDGET_UPDATE.
-- Kostya
08.06.2010 15:18, cellurl пишет:
I got it working. I tossed my version and started with a copy of
ApiDemos, adding code below.
One interesting observation:
ApiDemos.apk actually contains three things.
Widget:
Shortcut:
App:
The shortcut and app point to different starting points ;-)
Thanks all for holding my hand.
jp
public class ExampleBroadcastReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
if (action.equals("org.jamesp.gpscruise.UpdateWidgetAction"))
...
public class StatusBarNotifications extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//Uri uri = Uri.parse("55");
//Intent intent = new
Intent("org.jamesp.gpscruise.UpdateWidgetAction", uri);
Intent intent = new
Intent("org.jamesp.gpscruise.UpdateWidgetAction");
sendBroadcast(intent);
<receiver android:name=".appwidget.ExampleBroadcastReceiver"
android:enabled="true">
<intent-filter>
<action android:name="org.jamesp.gpscruise.UpdateWidgetAction" />
</intent-filter>
</receiver>
----------------
--
Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com
--
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