In my app I am sending an intent to update an appWidget. The problem is,
from the logcat I can see that the intent is taking on average ten seconds
to be received.
05-16 18:12:54.070: DEBUG/PHCA_Variable(7580): Broadcast sent
05-16 18:12:54.080: INFO/ActivityManager(274): Starting: Intent {
flg=0x10000000 cmp=com.skipmorrow.phca/.WidgetDialogResponseActivity (has
extras) } from pid 7580
05-16 18:12:54.100: WARN/ActivityManager(274): Trying to launch
com.skipmorrow.phca/.WidgetDialogResponseActivity
05-16 18:12:54.170: DEBUG/InputTransport(274): Input channel
constructed: name='40832a98
com.skipmorrow.phca/com.skipmorrow.phca.WidgetDialogResponseActivity
(server)', ashmemFd=299, receivePipeFd=311, sendPipeFd=310
05-16 18:12:54.170: DEBUG/InputTransport(274): Input channel
constructed: name='40832a98
com.skipmorrow.phca/com.skipmorrow.phca.WidgetDialogResponseActivity
(client)', ashmemFd=304, receivePipeFd=309, sendPipeFd=313
05-16 18:12:54.170: DEBUG/InputTransport(274): Input channel
destroyed: name='40832a98
com.skipmorrow.phca/com.skipmorrow.phca.WidgetDialogResponseActivity
(client)', ashmemFd=304, receivePipeFd=309, sendPipeFd=313
05-16 18:12:54.180: DEBUG/InputTransport(7580): Input channel
constructed: name='40832a98
com.skipmorrow.phca/com.skipmorrow.phca.WidgetDialogResponseActivity
(client)', ashmemFd=66, receivePipeFd=67, sendPipeFd=68
05-16 18:12:54.460: INFO/ActivityManager(274): Displayed
com.skipmorrow.phca/.WidgetDialogResponseActivity: +362ms
05-16 18:12:56.140: INFO/InputDispatcher(274): Delivering key to
current input target: action: 0, channel '40832a98
com.skipmorrow.phca/com.skipmorrow.phca.WidgetDialogResponseActivity
(server)'
05-16 18:12:56.260: INFO/InputDispatcher(274): Delivering key to
current input target: action: 1, channel '40832a98
com.skipmorrow.phca/com.skipmorrow.phca.WidgetDialogResponseActivity
(server)'
05-16 18:12:56.390: DEBUG/InputTransport(7580): Input channel
destroyed: name='40832a98
com.skipmorrow.phca/com.skipmorrow.phca.WidgetDialogResponseActivity
(client)', ashmemFd=66, receivePipeFd=67, sendPipeFd=68
05-16 18:13:03.350: DEBUG/PHCA_PhcaAppWidgetProvider(7580):
onReceive(); action = android.appwidget.action.APPWIDGET_UPDATE
The only thing I see that looks a little fishy is a warning that an
activity is starting. Why would that be a warning? Other than that,
everything seems ok.
The code to send the intent is nothing special:
Log.d(MY_DEBUG_TAG, "UpdateAppWidgets()");
Intent i = new Intent();
i.setAction(AppWidgetManager.ACTION_APPWIDGET_UPDATE);
ComponentName phcaWidget = new ComponentName(ctx,
PhcaAppWidgetProvider.class);
i.putExtra("appWidgetIds",
AppWidgetManager.getInstance(ctx).getAppWidgetIds(phcaWidget));
ctx.sendBroadcast(i);
Log.d(MY_DEBUG_TAG, "Broadcast sent");
And the onReceive in the appWidgetProvider is nothing special either. The
Log statement is the first command.
What could cause an intent to take upwards of ten seconds to be received?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en